init
Call the init API to initialize the client SDK.
Note: The SDK is initialized after the first API call.
inittakes effect only on the first call when the SDK is not initialized. Subsequent calls are silently ignored even if different configurations are provided. To apply a new configuration, calldestroyfirst, then callACTapManager.getInstance(context)to obtain a fresh instance, and callinitagain.
Method signature
ACTapManager.getInstance(context).init(config)Request parameters
Item | Type | Description | Required |
config | Configuration settings for the SDK. | No |
Note: If you pass
null, the SDK uses its built-in defaults: transit and lock-screen payment are disabled, and the authentication mode isNFCAuthMode.FLEXIBLE.
APNFCConfig
Item | Type | Description | Default value | Required |
authType | The authentication type. |
| No | |
isSupportTransit | Boolean | Whether to support transportation scenarios. Valid values are:
|
| No |
isSupportLockScreenPay | Boolean | Whether to support transportation payments when the screen is off. Valid values are:
|
| No |
isNeedConfirmActivate | Boolean | Whether secondary confirmation is required for card activation. Valid values are:
|
| No |
minNumberAllowedReplenish | Integer | The minimum Credential threshold for replenishment requests through the replenish API. When local Credentials exceed this value, replenish calls return the |
| No |
autoReplenishThreshold | Integer | The threshold for automatic replenishment. When Credentials fall below this threshold due to transactions, the SDK automatically triggers replenishment.
|
| No |
initMonitorDefault | Boolean | Whether to set NFCMonitor init status to false by default. Valid values are:
|
| No |
isUseDefaultDeviceFingerPrint | Boolean | Whether the default device fingerprint is used. Valid values are:
|
| No |
NFCAuthMode
Item | Type | Description |
| String | The SDK's internal risk control determines password exemption. If a previous authentication is passed within 5 minutes, the password-exempted amount can be increased. |
| String | The SDK's internal risk control determines password exemption. |
| String | Requires authentication for every transaction. |
Response parameters
N/A
Sample
private APNFCConfig config = APNFCConfig.newBuilder()
.setNeedConfirmActivate(true)
.setShowCoreLog(BuildConfig.DEBUG)
.build();
ACTapManager.getInstance(getApplication()).init(config);Note: APNFCConfig.Builder provides the following setters:
setAutoReplenishThresholdsetMinNumberAllowedReplenishsetAuthTypesetSupportTransitsetSupportLockScreenPaysetNeedConfirmActivatesetInitMonitorDefaultsetUseDefaultDeviceFingerPrint