mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-02-23 23:17:39 +01:00
add oldschool text invite
This commit is contained in:
parent
2c858ff3ae
commit
9892ea8291
@ -36,10 +36,16 @@ class AboutActivity : SimpleActivity() {
|
||||
about_email.movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
return "market://details?id=" + packageName
|
||||
} 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="third_party_licences_underlined"><u>Third party licences</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="follow_us">Follow us:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user