To create a GameballApp instance you need to call the getInstance method and pass it a Context instance of the current Activity holding the GameballApp.
val gameballApp = GameballApp.getInstance(applicationContext)
Initialize GameballApp Instance
To initialize GameballApp instance in your application class, use the init method which takes the following parameters:
// Using the instantiated instance of GameballAppgameballApp.init("{your API Key}","{lang}","{your Platform name}","{your Shop name}");//You can access the init method directly as followsGameballApp.getInstance(getApplicationContext()).init("{your API Key}", "{lang}", "{your Platform name}", "{your Shop name}");
// Using the instantiated instance of GameballAppgameballApp.init("{your API Key}", "{lang}", "{your Platform name}", "{your Shop name}")//You can access the init method directly as followsGameballApp.getInstance(applicationContext).init("{your API Key}", "{lang}", "{your Platform name}", "{your Shop name}")
Initialize Firebase Push Notifications
To be able to use Firebase Push Notifications feature through Gameball you'd need to first initialize firebase device token by calling the following method right after the init method or before the customer registration.
// Using the instantiated instance of GameballAppgameballApp.initializeFirebase();
// Using the instantiated instance of GameballAppgameballApp.initializeFirebase()
Your platform language preference to view Gameball Widget with.
Note: The language provided should be as per configured languages in your account. If not provided the Gameball profile widget will be shown with your account default language