registerPlugin
Call the registerPlugin API to register SPI plugins.
Method signature
void registerPlugin(Class<T> clazz, T instance);Request parameters
Item | Type | Description | Required |
clazz | Class<T> | Extended plugins for injection. Available plugins for clazz injection, see Available SPI plugins. | Yes |
instance | T | Corresponding instance. | Yes |
Available SPI plugins
Each plugin corresponds to an API. Click the plugin name to view the API definition and implementation details.
Item | Description | Required |
Proxy network requests. | Yes | |
Transaction authentication. | Yes | |
Proxy configurations. Enables the integrating party to customize configuration delivery and modify internal SDK implementation through multiple remote configuration projects. | Yes | |
Manages log output. Enables the integrator party to customize log printing to access internal SDK log output. | Yes | |
Monitors the events which are triggered inside the SDK. | Yes | |
Implements and manages your own thread pool. | No | |
Enables the SDK to request device fingerprints from the MPP. | No | |
Provides wallet context, including location and foreground status, to enrich SDK telemetry data. | No |
Note: The following two plugins have SDK-provided fallbacks:
- ThreadPoolService: Falls back to a built-in thread pool implementation if not registered.
- DeviceFingerPrintService: Falls back to a built-in implementation if not registered, provided that setUseDefaultDeviceFingerPrint(true) is set during initialization.
Response parameters
N/A
Sample
ACTapManager manager = ACTapManager.getInstance(this.getApplication());
manager.registerPlugin(LoggerProxy.class, new CustomLogger());