🔌Initialize SDK
To make all of the features of the Playtime Ads SDK available, you need to initialize it first. This initialization happens asynchronously in the background, with its completion indicated by a callback method. Make sure to initialize the SDK immediately after the app launches and after the user login in the app.
Best practices for the SDK initialization:
Initialize early: Initialize the SDK as soon as possible after your app starts. This ensures all SDK features are ready for use right away.
Initialize after your app authentication: Once a user signs up or logs in in your app, initialize the SDK again with the latest user details. This updates the userID within the SDK and ensures reward will be delivered to the user. If a user is not login in your app, you can pass blank or 0.
Initialization triggers: Call the init method at the app start and after login
Initialization
The initialization will run in the main application process asynchronously in the background and notify you when it is finished by invoking the OfferWallInitListener's onInitSuccess or onAlreadyInitializing or onInitFailed method
Important: Initialization must happen on the main thread since it's a UI-related action. Calling any of the init methods off the main thread could lead to app disruptions.
Parameters:
Re-initialize Playtime Ads SDK after user login. Otherwise rewarding the user is not guaranteed
Clear Session on Logout
Don't miss to clear Playtime Ads session when users logout from the app.
Last updated