mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-06-05 21:49:21 +02:00
add oldschool text invite
This commit is contained in:
@@ -36,10 +36,16 @@ class AboutActivity : SimpleActivity() {
|
|||||||
about_email.movementMethod = LinkMovementMethod.getInstance()
|
about_email.movementMethod = LinkMovementMethod.getInstance()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun setupInvite() {
|
private fun setupInvite() {
|
||||||
about_invite.setOnClickListener {
|
val intent = Intent()
|
||||||
|
val text = String.format(getString(R.string.share_text), getString(R.string.app_name), getStoreUrl())
|
||||||
|
intent.action = Intent.ACTION_SEND
|
||||||
|
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name))
|
||||||
|
intent.putExtra(Intent.EXTRA_TEXT, text)
|
||||||
|
intent.type = "text/plain"
|
||||||
|
|
||||||
|
about_invite.setOnClickListener {
|
||||||
|
startActivity(Intent.createChooser(intent, getString(R.string.invite_via)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +95,11 @@ class AboutActivity : SimpleActivity() {
|
|||||||
try {
|
try {
|
||||||
return "market://details?id=" + packageName
|
return "market://details?id=" + packageName
|
||||||
} catch (ignored: ActivityNotFoundException) {
|
} catch (ignored: ActivityNotFoundException) {
|
||||||
return "http://play.google.com/store/apps/details?id=" + packageName
|
return getStoreUrl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getStoreUrl(): String {
|
||||||
|
return "https://play.google.com/store/apps/details?id=" + packageName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,8 @@
|
|||||||
<string name="email" translatable="false">hello@simplemobiletools.com</string>
|
<string name="email" translatable="false">hello@simplemobiletools.com</string>
|
||||||
<string name="third_party_licences_underlined"><u>Third party licences</u></string>
|
<string name="third_party_licences_underlined"><u>Third party licences</u></string>
|
||||||
<string name="invite_friends_underlined"><u>Invite friends</u></string>
|
<string name="invite_friends_underlined"><u>Invite friends</u></string>
|
||||||
<string name="come_check_out">Come check out %s</string>
|
<string name="share_text">Hey, come check out %1$s at %2$s</string>
|
||||||
|
<string name="invite_via">Invite via</string>
|
||||||
<string name="rate_us_underlined"><u>Rate us in the Play Store</u></string>
|
<string name="rate_us_underlined"><u>Rate us in the Play Store</u></string>
|
||||||
<string name="follow_us">Follow us:</string>
|
<string name="follow_us">Follow us:</string>
|
||||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||||
|
Reference in New Issue
Block a user