isNfcPaySettingsCompleted
Call the isNfcPaySettingsCompleted API to check if NFC payment is enabled.
Method signature
copy
fun isNfcPaySettingsCompleted(activity: Activity, apduServiceName: String)Request parameters
Item | Type | Description | Required |
activity | Activity | The context of the current NFC settings page. | Required |
apduServiceName | String | The customized APDU service name during integration. | Required |
Response parameters
Name | Type | Description | Required |
/ | Boolean | Indicates whether NFC payment is enabled. | Required |
Sample
copy
private fun isNfcSettingCompleted() {
// Check if the NFC function is enabled before tapping and payment.
NFCUtils.isNfcPaySettingsCompleted(context = context, apduServiceName = "com.iap.android.tappayment.verify.hce.IAPNFCHostApduService")
}