0

I was researching to find if there is a way currently to receive a broadcast event when someone changes default payment app in Tap & Pay option inside settings

The article related to this which i found was https://developer.android.com/reference/android/nfc/NfcAdapter#ACTION_PREFERRED_PAYMENT_CHANGED which will be added in Android R.

Is there any other way an android app can detect on its launch whether its the default app set in Tap and Pay Option?

Any help is appreciated, thank you!

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Anonymous
  • 2,184
  • 15
  • 23

1 Answers1

0

Found the answer for this here

https://developer.android.com/guide/topics/connectivity/nfc/hce#CheckIfDefault

 val isAppNFCDefault = cardEmulationManager.isDefaultServiceForCategory(
        ComponentName(
            this@MainActivity,
            MyHostApduService::class.java
        ), CardEmulation.CATEGORY_PAYMENT
    )
Anonymous
  • 2,184
  • 15
  • 23