Test Mode
Learn how to work with test mode for Android ATS Mobile SDK.
You can simulate the actual flow of the library without setting up on the console side and creating network requests from the library itself to the backend.
Activate Test Mode
To activate test mode, set LRAtsConfiguration
's isTestMode
param value to true
during initialization of the library:
LRAtsManager.initialize(LRAtsConfiguration("40b867f9-93cc-4687-a2c7-d02bed91aaee", true),
object : LRCompletionHandlerCallback {
override fun invoke(success: Boolean, error: LRError?) {
if (success) {
// SDK ready for use
} else {
// SDK failed to initialize
}
}
})
LRAtsManager.INSTANCE.initialize(new LRAtsConfiguration("40b867f9-93cc-4687-a2c7-d02bed91aaee", true), new LRCompletionHandlerCallback() {
@Override
public void invoke(boolean success, @Nullable LRError lrError) {
if (success) {
// SDK ready for use
} else {
// SDK failed to initialize
}
}
});
Test Configuration
In test mode, the library uses following test configuration:
{
"pId": 1,
"preferredATS": "regular",
"geoTargeting": {
"ccpa": {
"allCountries": false,
"allStates": true,
"countries": [
"US"
],
"states": []
},
"gdpr": {
"allCountries": false,
"allStates": false,
"countries": [
"AT",
"BE",
"BG",
"RS",
"ME",
"BA"
],
"states": []
}
},
"isLoggingEnabled": true,
"envelope": {
"expirationTime": 420000,
"minimumRefreshTime": 60000
},
"atsEnabledCountries": [
"AT",
"NL",
"RS",
"BG",
"US",
"ME",
"BA"
],
"isPlacementApproved": true
}
Envelope Flow
In order to get envelopes, you can use the getEnvelope API. The returned envelope will be a random string in the same format as envelopes in real use cases.
Updated about 5 hours ago