Nonstop Kotlin SDK
Initialization
Initialize the Nonstop SDK in your Application class' OnCreate method
Initialization
The initialize method takes several configuration parameters.
- The SDK needs a reference to the AppContext - this should be passed as the first parameter
- The SDK will perform some internal Amplitude tracking - the Amplitude API key it should be used should be passed as the second parameter. (Note passing an empty string here will disable Amplitude tracking)
- The SDK needs to know which Nonstop API Environment to use - this should be passed as the third parameter.
- The SDK needs to know which platform it is being run on - both for reporting to Nonstop and also for reporting to Amplitude. This should be passed as the fourth parameter. Valid values are
ANDROID,KINDLE,FIRETVandANDROID_TV.
Example
class App : Application() {
override fun onCreate() {
super.onCreate()
Nonstop.init(this, BuildConfig.AmplitudeApiKey, Environment.STAGING, Platform.ANDROID)
}
}
Environments
The Environments parameter controls which APIs the SDK will hit, and thus which Nonstop Admin and ShowMS Environment is tied to them. Developers should be conscious of this and match their Nonstop Environment to their ShowMS environment for the given build.
- Dev
- Admin - https://dev.admin.nonstopapp.co/
- Client API - https://dev.api.nonstopapp.co/swagger/index.html
- ShowMS Web - http://dev.showms.freeform.go.com/
- ShowMS Admin - http://dev.admin.freeform.showms.com/
- ShowMS API - https://dev.api.showms.com/swagger/ui/index
- Staging
- Admin - https://staging.admin.nonstopapp.co/
- Client API - https://staging.api.nonstopapp.co/swagger/index.html
- ShowMS Web - http://staging.showms.freeform.go.com/
- ShowMS Admin - http://staging.admin.freeform.showms.com/
- ShowMS API - https://staging.api.showms.com/swagger/ui/index
- QA
- Admin - https://qa.admin.nonstopapp.co/
- Client API - https://qa.api.nonstopapp.co/swagger/index.html
- ShowMS Web - http://qa.showms.freeform.go.com/
- ShowMS Admin - http://qa.admin.freeform.showms.com/
- ShowMS API - https://qa.api.showms.com/swagger/ui/index
- Production
- Admin - https://admin.nonstopapp.co/
- Client API - https://api.nonstopapp.co/swagger/index.html
- ShowMS Web - http://freeform.go.com/
- ShowMS Admin - http://admin.showms.com/
- ShowMS API - https://api.showms.com/swagger/ui/index
Reward Animations
Note: The Nonstop SDK will asynchronously preload reward animations on initialize for improved performance when they are required so you may see this network call on app start.