Added invite link configuration

pull/147/head
M66B 6 years ago
parent 980e634d90
commit 74a4a25fd2

@ -51,6 +51,7 @@ android {
full { full {
dimension "all" dimension "all"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false" buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "INVITE_LINK", "\"https://email.faircode.eu/\""
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/donate/\"" buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/donate/\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\"" buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "BETA_RELEASE", "true"
@ -58,6 +59,7 @@ android {
play_beta { play_beta {
dimension "all" dimension "all"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true" buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "INVITE_LINK", "\"https://play.google.com/apps/testing/eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\"" buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\"" buildConfigField "String", "GITHUB_LATEST_API", "\"\""
buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "BETA_RELEASE", "true"
@ -65,6 +67,7 @@ android {
play_release { play_release {
dimension "all" dimension "all"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true" buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "INVITE_LINK", "\"https://play.google.com/store/apps/details?id=eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\"" buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\"" buildConfigField "String", "GITHUB_LATEST_API", "\"\""
buildConfigField "boolean", "BETA_RELEASE", "false" buildConfigField "boolean", "BETA_RELEASE", "false"

@ -804,10 +804,14 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
} }
private Intent getIntentInvite() { private Intent getIntentInvite() {
StringBuilder sb = new StringBuilder();
sb.append(getString(R.string.title_try)).append("\n\n");
sb.append(BuildConfig.INVITE_LINK).append("\n\n");
Intent intent = new Intent(Intent.ACTION_SEND); Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain"); intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name)); intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));
intent.putExtra(Intent.EXTRA_TEXT, getString(R.string.title_try) + "\n\nhttps://email.faircode.eu/\n\n"); intent.putExtra(Intent.EXTRA_TEXT, sb.toString());
return intent; return intent;
} }

Loading…
Cancel
Save