tap-to-pay part 3: default wallet and shortcut

This commit is contained in:
2026-05-29 15:58:05 +05:00
parent 0f77216d2d
commit 2df162c09e
6 changed files with 210 additions and 22 deletions
@@ -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