you will receive the username and password separately
3.) Add MainActivity to manifest file and the intent filters for launching MainActivity, Remove remaining intent filters for remaining launcher an activity.
4.) Extend AppApplication with WinzoApplication, register your activity with WinZO activity.
Set the game icon by using WinzoSdk.setGameIcon method.
Set product flavor by using WinzoSdk.setProductFlavor method.
class ClientApplication : WinzoApplication() {
override fun onCreate() {
super.onCreate()
WinzoSdk.registerActivity(ClientActivity::class.java)
WinzoSdk.setGameIcon(this.getDrawable(R.drawable.your_game_icon))
if (BuildConfig.is_live) {
WinzoSdk.setProductFlavor(ProductFlavor.LIVE)
} else {
WinzoSdk.setProductFlavor(ProductFlavor.STAG)
}
}
}
5.) You will receive the listed values in intent in registered activity (the activity you have registered with WinzoSdk.registerActivity(ClientActivity::class.java))
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val winzoAccessToken = intent.getStringExtra(Constants.WINZO_ACCESS_TOKEN)
val joinCode = intent.getStringExtra(Constants.JOIN_CODE)
val bootAmount = intent.getFloatExtra(Constants.BOOT_AMOUNT, 0f)
val bootId = intent.getStringExtra(Constants.BOOT_ID)
...
}
joinCode, bootAmount, bootId can be null
winzoAccessToken will be used in API calls.
if bootAmount and bootIdis null then show the main landing screen otherwise start the game with these values
6.) Finally, add the application class to the manifest file