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.
Campaigns
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.
Campaign
Explanation
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".
Example of a Time-based Campaign
Example of an Event-Based Campaign
Terms of Service
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.
Access to Advertising Info
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.
How Games Are Matched to Users
The Playtime algorithm prioritizes displaying games to users based on their potential to generate maximum revenue and likelihood of being downloaded.
Add a Teaser Event
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".
try { Playtime.sendUserEvent(context, Playtime.EVENT_TEASER_SHOWN, null, playtimeParams)} catch (e: PlaytimeNotInitializedException) {// you have to initialize the Playtime SDK}
try {Playtime.sendUserEvent(context,Playtime.EVENT_TEASER_SHOWN,null, playtimeParams);}catch (PlaytimeNotInitializedException e) {// you have to initialize the Playtime SDK}
function() {// show teaser buttonwindow.PlaytimePlugin.sendUserEvent(window.PlaytimePlugin.EVENT_TEASER_SHOWN,'<subId1>','<subId2>'); },function() {//can't show the catalog }
Launch the Playtime Catalog
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.
try {val playtimeParams = PlaytimeParams.Builder() .setUaNetwork("network") .setUaChannel("channel") .setUaSubPublisherCleartext("SubPublisherCleartext") .setUaSubPublisherEncrypted("SubPublisherEncrypted") .setPlacement("placement") .build()val playtimeCatalogIntent = Playtime.getCatalogIntent(context, playtimeParams) context.startActivity(playtimeCatalogIntent)} catch(notInitializedException: PlaytimeNotInitializedException) {// you have not initialized the Playtime SDK} catch(exception: PlaytimeException) {// the catalog cannot be displayed for some other reason}
try {PlaytimeParams playtimeParams =new PlaytimeParams.Builder().setUaNetwork("network").setUaChannel("channel").setUaSubPublisherCleartext("SubPublisherCleartext").setUaSubPublisherEncrypted("SubPublisherEncrypted").setPlacement("placement").build();Intent playtimeCatalogIntent =Playtime.getCatalogIntent(context, playtimeParams);context.startActivity(playtimeCatalogIntent);} catch (PlaytimeNotInitializedException notInitializedException) {// you have not initialized the Playtime SDK} catch (PlaytimeException exception) {// the catalog cannot be displayed for some other reason}
Playtime.showCatalog({'uaNetwork':"uaNetwork_value",'uaChannel':"uaChannel_value",'uaSubPublisherCleartext':"uaSubPublisherCleartext_value",'uaSubPublisherEncrypted':"uaSubPublisherEncrypted_value",'placement':'placement_value'}).then(() => {console.log('Now showing Playtime offerwall'); }).catch((err) => {console.log('Could not show Playtime offerwall');console.error(err); });
window.PlaytimePlugin.showCatalog(function() {// the catalog was displayed to the user },function(err) {// the catalog cannot be displayed },);//You can pass two optional Sub-IDs when you launch Playtime, which will be logged every time a user views or clicks a campaign: window.PlaytimePlugin.showCatalogWithSubIDs('<subId1>','<subId2>', success, error).
Set Up a Listener (Native)
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().
Playtime.setCatalogListener(object:PlaytimeCatalogListener() {funonCatalogOpened(type:String) { Log.d(TAG, "Catalog of type '"+ type +"' was opened") }funonCatalogClosed(type:String) { Log.d(TAG, "Catalog of type '"+ type +"' was closed") }})
Playtime.setCatalogListener(newPlaytimeCatalogListener() { @OverridepublicvoidonCatalogOpened(String type) {Log.d(TAG,"Catalog of type '"+ type +"' was opened"); } @OverridepublicvoidonCatalogClosed(String type) {Log.d(TAG,"Catalog of type '"+ type +"' was closed"); }});
Example: Playtime Catalog & My Games
Additional Useful Methods
name
description
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.