# Mandatory Functions

Following functions need to be called for proper functioning of the game with SDK.&#x20;

1. **onGameEngineLoaded()**\
   This function needs to be called after the game engine is loaded&#x20;
2. **updatePlayerScore(scoreData)**\
   This function needs to be called every time the player score is updated&#x20;
3. **finalPlayerScore(scoreData)**\
   This function needs to be called for submitting final score of the player&#x20;
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&#x20;
