Mandatory Functions

Following functions need to be called for proper functioning of the game with SDK.

  1. onGameEngineLoaded() This function needs to be called after the game engine is loaded

  2. updatePlayerScore(scoreData) This function needs to be called every time the player score is updated

  3. finalPlayerScore(scoreData) This function needs to be called for submitting final score of the player

  4. onGameEnded() This function needs to be called after the game is completed

  5. sendAnalyticsEvent(event: String?, paramBundle: Bundle = Bundle()) This function can be called to fire analytics events

  6. onCreateSdk(savedInstanceState: Bundle?) Initialize [GameSdk] here by calling [GameSdk.initialize]. This method will run on MainThread so this method should not perform long running blocking task.

  7. getGameView(parentView: ViewGroup): View This is an abstract function, override it to return a view showing gameplay

Last updated