Alipay+ DocsAlipay+ Docs

registerPlugin

Call the registerPlugin API to register SPI extension functions.

Method Signature

copy
void registerPlugin(Class<T> clazz, T instance);

Request parameters

Item

Type

Description

Required

clazz

Class<T>

Extension functions to inject.

Required

instance

T

Corresponding instance.

Required

Available functions for clazz injection:

Item

Description

NFCRequestProxy

Proxy network requests.

TransactionPermit

Transaction authentication.

ConfigProxy

Proxy configurations. Enables the integrating party to customize configuration delivery and modify internal SDK implementation through multiple remote configuration projects.

LoggerProxy

Manages log output. Enables the integrator party to customize log printing to access internal SDK log output.

NFCMonitor

Monitors the events which are triggered inside the SDK.

ThreadPoolService

Implements and manages your own thread pool.

DeviceFingerprintService

Enables the SDK to request device fingerprints from the MPP.

EncryptionProxy

Proxy used for encryption and decryption.

StorageService

Service for data storage in shared preferences.

Response parameters

N/A

Sample

copy
manager = ACTapManager.getInstance(this.getApplication()).isPaymentAvailable();
manager.registerPlugin(LoggerProxy.class, new CustomLogger());