mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-03-10 00:00:08 +01:00
add Google app invites
This commit is contained in:
parent
15ebc33feb
commit
b732497afb
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
/captures
|
||||
release.keystore
|
||||
signing.properties
|
||||
/app/google-services.json
|
||||
|
@ -36,6 +36,7 @@ dependencies {
|
||||
compile 'com.android.support:appcompat-v7:23.4.0'
|
||||
compile 'com.android.support:recyclerview-v7:23.4.0'
|
||||
compile 'com.android.support:design:23.4.0'
|
||||
compile 'com.google.firebase:firebase-invites:9.4.0'
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import android.os.Bundle
|
||||
import android.text.Html
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.View
|
||||
import com.google.android.gms.appinvite.AppInviteInvitation
|
||||
import com.simplemobiletools.applauncher.BuildConfig
|
||||
import com.simplemobiletools.applauncher.R
|
||||
import com.simplemobiletools.applauncher.extensions.isFirstRun
|
||||
@ -21,6 +22,7 @@ class AboutActivity : SimpleActivity() {
|
||||
setContentView(R.layout.activity_about)
|
||||
|
||||
setupEmail()
|
||||
setupInvite()
|
||||
setupRateUs()
|
||||
setupLicense()
|
||||
setupSocial()
|
||||
@ -35,6 +37,17 @@ class AboutActivity : SimpleActivity() {
|
||||
about_email.movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
|
||||
|
||||
private fun setupInvite() {
|
||||
val intent = AppInviteInvitation.IntentBuilder(getString(R.string.invite_friends))
|
||||
.setMessage(String.format(getString(R.string.come_check_out), getString(R.string.app_name), 1))
|
||||
.build()
|
||||
|
||||
about_invite.setOnClickListener {
|
||||
startActivityForResult(intent, 1)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupRateUs() {
|
||||
if (preferences.isFirstRun) {
|
||||
about_rate_us.visibility = View.GONE
|
||||
|
@ -37,12 +37,22 @@
|
||||
android:text="@string/email"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_rate_us"
|
||||
android:id="@+id/about_invite"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/about_email"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/invite_friends_underlined"
|
||||
android:textColor="@color/colorPrimary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_rate_us"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/about_invite"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/rate_us_underlined"
|
||||
android:textColor="@color/colorPrimary"/>
|
||||
|
||||
|
@ -14,6 +14,9 @@
|
||||
<string name="email_label">Send your feedback or suggestions to:</string>
|
||||
<string name="email" translatable="false">hello@simplemobiletools.com</string>
|
||||
<string name="third_party_licences_underlined"><u>Third party licences</u></string>
|
||||
<string name="invite_friends">Invite friends</string>
|
||||
<string name="invite_friends_underlined"><u>Invite friends</u></string>
|
||||
<string name="come_check_out">Come check out %s</string>
|
||||
<string name="rate_us_underlined"><u>Rate us in the Play Store</u></string>
|
||||
<string name="follow_us">Follow us:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.1.2'
|
||||
|
||||
classpath 'com.google.gms:google-services:3.0.0'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user