There are 2 parts to implementing and using the Playtime SDK:
Part 1:
Part 2:
The primary function of the Playtime SDK is showing the catalog to the users. The Playtime catalog lists various campaigns that the users can complete to receive a reward in the app's native in-app currency.
Games displayed to users are chosen programmatically based on their preferences and profile, while the specific campaigns available to them depend on the permissions granted or country.
Advertisers define ad formats and target countries through campaigns, which are then featured in the Playtime Catalog. These campaigns are set by advertisers and allow for rewards once the completion of the campaign conditions are verified through the MMP.
Time-based
Rewards users for the time they spend in the advertised app, e.g. Earn 50 coins per minute for playing a game.
Event-based
Rewards users for achieving a designated combination of events within advertised apps, e.g. in-app purchases, viewing video ads, and/or reaching specified game levels. Users are rewarded after completing each task. Example: "Up to 5 Coins per Task" or "Complete Level 10".
Users need to accept adjoe's Terms of Service (TOS) to use Playtime and access games. Agreeing to the TOS is mandatory before installing any partner apps. After users accept the TOS, we can identify the types of apps/games they have installed, allowing our algorithm to tailor game suggestions on the catalog based on their preferences.
We also ask the user to accept the App Usage Permissions. This allows us to monitor the time spent in each game or app. Without accepting these permissions, users won't be eligible to participate in Playtime campaigns and will be limited to only Advance or Advance+ campaigns.
The Playtime algorithm prioritizes displaying games to users based on their potential to generate maximum revenue and likelihood of being downloaded.
When the placement button for Playtime appears, whether clicked or not, please send us the teaser event. This notifies adjoe when and where the placement is shown, which is crucial for tracking user engagement and enhancing the user experience.
Use playtimeParams to pass in the placement
information, i.e., where in the app the button was shown - for example: "Main Page".
We recommend triggering the catalog via a button or UI element (within the SDK it is housed in a separate activity). Rather than launching the activity directly, we provide an Intent for you to initiate it, enabling, for example, transition animations for a smoother user experience Use the code below to display the adjoe Playtime Offerwall. It is recommended to send any updated PlaytimeParams
when launching the Playtime Catalog.
You can set up a listener to be notified when the Playtime Catalog is opened or closed, with the event type
always being catalog
. To remove the listener, simply call Playtime.removeCatalogListener()
.
getVersion
Returns the internal version code of the Playtime SDK, for example 70
.
getVersionName
Returns the version name of the Playtime SDK, for example 3.0.0
hasAcceptedTOS
Checks whether the user has accepted the adjoe Terms of Service (TOS). Returns true
if the user has accepted the TOS and false
otherwise.
getUserId
Returns the unique ID of the user by which the user is identified.
hasAcceptedUsagePermission
Checks whether the user has given access to the usage statistics. Returns true
when the user has given access, false
otherwise.
To make all of the features of the Playtime 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 each time it returns to the foreground.
Initialize early: Initialize the SDK as soon as possible after your app starts. This ensures all Playtime SDK features are ready for use right away.
Initialize after your app authentication: Once a user signs up or logs in, initialize the SDK again with the latest user details. This updates the userID within the SDK.
Initialize regularly: For the best user experience, call the init
method every time your app comes into the foreground. Doing so will not affect your app's performance.
Initialization triggers: Call the init
method at the app start and resume (when the app comes back into the foreground).
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.
Pass the following additional options to the Playtime SDK during initialization:
User ID
String
A custom identifier you can assign to each user. If you haven't set one, the Playtime SDK generates it automatically. It is accessible through Playtime.getUserId(Context)
. This ID is necessary for S2S payouts, thus required. Ensure this value is url-safe
and that the value is never empty.
Object
Object
Extensions
Object
When initializing the SDK, you should include additional User Acquisition and Playtime placement parameters. These parameters allow you to track and analyze Playtime's performance within your app.
To make the most of the Playtime SDK, to maximize your revenue and provide the best user experience, use all of these parameters for data-driven optimizations. For instance, you can monitor the performance of different Playtime button placements or determine the effectiveness of different UA sources.
You can provide these parameters in any combination, both at initialization and at any point in the app's lifecycle—such as when a user launches the Playtime Catalog interacts with a campaign or requests a payout.
These values must be url-safe
as they could potentially be returned as query parameters in the S2S Payout request.
UA Network
String
User Acquisition Network. The network through which the user was acquired, e.g., Adwords
, Facebook
, or Organic
.
UA Channel
String
User Acquisition Channel. The channel within the network from which the user was acquired, e.g. incentivized
or video campaigns
.
User Acquisition Sub Publisher Cleartext
String
The cleartext package name of the sub-publisher's app ID within the network from which the user was acquired, e.g., com.domain.appName
.
User Acquisition Sub Publisher Encrypted
String
The encrypted package name or app ID of the sub-publisher's app from the network where the user was acquired.
Placement
String
The placement of the Playtime Catalog inside your app, e.g., "Main Screen"
, "Shop"
, "Interstitial"
, "More Diamonds Screen"
, etc.
Our game recommendations are personalized through algorithms that consider users' preferences and gender information. If a user consents to share their gender and/or birthday, you can share this information with adjoe to enhance the customization of game suggestions.
The code below is for demonstration purposes and can be modified to best suit your app's set-up. The important thing is that you get the user's birthday and gender information from your backend and pass in the data to adjoe when initializing.
The birthday data should be in ISO format. If your data doesn't already look like that, please make sure to format it so that it is. Example: 2023-07-17T22:25:00.000Z
These are optional identifiers used in your backend. They will be provided back in the S2S payout URL.
We recommend to verify the SDK is correctly initialized. Each wrapper provides an Playtime.isInitialized
method for this purpose. When executed, this method returns true
if the SDK is initialized, and false
otherwise. Use IsInitialized
for debugging or to verify SDK initialization before calling other methods.
Important: Do not call Playtime.init
based on the result of isInitialized.
The SDK already performs its own initialization checks. Doing so again may degrade the user experience.
Values for the User Acquisition and Playtime placement information. These values must be url-safe
. More on this .
Birthday and gender data of the app users. This data is used by adjoe to provide the best for the user. More on this .
These are optional identifiers used in your backend. They will be provided back in the .