android-tap-and-pay

Set application default payment service

依然范特西╮ 提交于 2019-12-03 19:15:49
问题 Let's think about a case where user has installed multiple applications capable of NFC HCE payments. Those application services are visible under settings NFC Tap and Pay. How to programmatically change your application to be the default payment service if it's not? CardEmulation seems only to have API to query if service for category is default. Thanks. 回答1: The main idea behind having that UI is that the user can decide on which payment app should be the default app. Consequently, there is

Set application default payment service

左心房为你撑大大i 提交于 2019-11-30 07:39:34
Let's think about a case where user has installed multiple applications capable of NFC HCE payments. Those application services are visible under settings NFC Tap and Pay. How to programmatically change your application to be the default payment service if it's not? CardEmulation seems only to have API to query if service for category is default. Thanks. The main idea behind having that UI is that the user can decide on which payment app should be the default app. Consequently, there is no way to programmatically set your app to be the default. However, you can request the user to set your app

Application not visible in Tap and Pay

僤鯓⒐⒋嵵緔 提交于 2019-11-29 07:32:26
What is the key thing to adjust in NFC HCE application to get it visible under settings NFC Tap and Pay Following code returns true for the app, so it's capable of payment: boolean isDefault = CardEmulation .getInstance(NfcAdapter.getDefaultAdapter(this)) .isDefaultServiceForCategory( new ComponentName(this, MyPaymentService.class), CardEmulation.CATEGORY_PAYMENT); Service declaration in manifest: <service android:name="my.package.MyPaymentService" android:exported="true" android:permission="android.permission.BIND_NFC_SERVICE" > <intent-filter> <action android:name="android.nfc.cardemulation

Application not visible in Tap and Pay

随声附和 提交于 2019-11-28 01:17:50
问题 What is the key thing to adjust in NFC HCE application to get it visible under settings NFC Tap and Pay Following code returns true for the app, so it's capable of payment: boolean isDefault = CardEmulation .getInstance(NfcAdapter.getDefaultAdapter(this)) .isDefaultServiceForCategory( new ComponentName(this, MyPaymentService.class), CardEmulation.CATEGORY_PAYMENT); Service declaration in manifest: <service android:name="my.package.MyPaymentService" android:exported="true" android:permission=