forked from thijooree/android
tap-to-pay part 3: default wallet and shortcut
This commit is contained in:
@@ -9,6 +9,7 @@ import sh.sar.basedbank.ui.onboarding.OnboardingActivity
|
||||
import sh.sar.basedbank.util.CredentialStore
|
||||
import sh.sar.basedbank.BasedBankApp
|
||||
import sh.sar.basedbank.R
|
||||
import sh.sar.basedbank.nfc.BmlTapToPayActivity
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
@@ -21,6 +22,13 @@ class MainActivity : AppCompatActivity() {
|
||||
val store = CredentialStore(this)
|
||||
val hasCredentials = store.hasMibCredentials() || store.hasBmlCredentials() || store.hasFahipayCredentials()
|
||||
|
||||
// Tap to Pay shortcut: go straight to the standalone payment activity
|
||||
if (intent?.action == "sh.sar.basedbank.TAP_TO_PAY") {
|
||||
startActivity(Intent(this, BmlTapToPayActivity::class.java))
|
||||
finish()
|
||||
return
|
||||
}
|
||||
|
||||
val navDestination = when (intent?.action) {
|
||||
"sh.sar.basedbank.OPEN_TRANSFER" -> R.id.nav_transfer
|
||||
"sh.sar.basedbank.OPEN_SCAN_QR" -> R.id.nav_transfer
|
||||
|
||||
Reference in New Issue
Block a user