Skip to content

Commit

Permalink
feat: share app link (openMF#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchtgpt authored May 17, 2020
1 parent bf210da commit 11c90f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,13 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV
replaceFragment(CustomerAccountFragment.newInstance(AccountType.DEPOSIT), true,
R.id.container)
}

R.id.item_logout -> {
showLogoutDialog()
}

R.id.item_product -> {
replaceFragment(ProductFragment.Companion.newInstance(), true,
R.id.container)
}

R.id.item_recent_transactions -> {
replaceFragment(RecentTransactionsFragment.Companion.newInstance(),true,R.id.container)
}
Expand All @@ -185,8 +182,14 @@ class DashboardActivity : MifosBaseActivity(), View.OnClickListener, NavigationV
R.id.item_settings -> {
replaceFragment(SettingsFragment.newInstance(), true, R.id.container)
}
R.id.item_share -> {
val sharingIntent = Intent(android.content.Intent.ACTION_SEND)
sharingIntent.type = "text/plain"
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.app_link))
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.share_message))
startActivity(Intent.createChooser(sharingIntent, getString(R.string.share_the_app_link)))
}
}

// close the drawer
drawerLayout.closeDrawer(GravityCompat.START)
setNavigationViewSelectedItem(R.id.item_home)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@
<string name="privacy_policy_host" translatable="false">openmf.github.io/privacy_policy_mifos_mobile.html</string>
<string name="privacy_policy_host_url" translatable="false">https://openmf.github.io/privacy_policy_mifos_mobile.html</string>
<string name="opensource_license_title">Open Source licenses</string>

<string name="app_link">App Link</string>
<string name="share_the_app_link">Share the app link via:</string>
<string name="share_message">You can download the Mifos Mobile CN app here: https://drive.google.com/file/d/1JGGf80FrTiUqYxZT8PHsGHb65yatQwfd/view?usp=sharing</string>

</resources>

0 comments on commit 11c90f6

Please sign in to comment.