Initializing FastTrack API

Before initializing FastTrack API, you have to check the state of FastTrack API if it has been configured previously.

To check the state of FastTrack API:

FastTrack.isConfigured();

If the state of FastTrack API is set to true, you can call the following code snippet to get the instance of FastTrack API:

FastTrack fastTrack = FastTrack.getInstance();

If the state of FastTrack API is set to false, you can start the initialization of FastTrack API using the following code snippet:

// 1. This is entry point for initialization the FastTrack API.
String FULL_ACTIVATION_CODE = "YOUR_ACTIVATION_CODE";

TransactionSignatureKey signKey = new TransactionSignatureKey(MessengerConfigurations.getSignaturePublicKeyPem());

new FastTrack.Builder(this.getApplicationContext())
                .withActivationCode(FULL_ACTIVATION_CODE)
                .withMspObfuscationKeys(Collections.singletonList(MessengerConfigurations.getObfuscationKey())) //for MSP
                .withMspVerificationKeys(Collections.singletonList(signKey)) // For MSP
                .build();
Note

In FastTrack API, to pass an optional parameter, use the .withxxxxx() method.

To use the Transaction Signing service, the obfuscation Keys .withMspObfuscationKeys() and the verification Key .withMspVerificationKeys() are required.