get Catalog Intent
Returns the Intent to launch the PlaytimeActivity displaying the catalog.
Use it like this:
try {
Intent playtimeCatalogIntent = Playtime.getCatalogIntent(activity);
activity.startActivity(playtimeCatalogIntent);
} catch (PlaytimeNotInitializedException notInitializedException) {
// you have not initialized the Playtime SDK
} catch (PlaytimeException exception) {
// the catalog cannot be displayed for some other reason
}
Return
The Intent to launch the catalog.
Parameters
context
A context.
Throws
When the catalog is not available.
Returns the Intent to launch the Catalog displaying the catalog.
Use it like this:
try {
Intent playtimeCatalogIntent = Playtime.getCatalogIntent(activity);
activity.startActivity(playtimeCatalogIntent);
} catch(PlaytimeNotInitializedException notInitializedException) {
// you have not initialized the Playtime SDK
} catch(PlaytimeException exception) {
// the catalog cannot be displayed for some other reason
}
Return
The Intent to launch the catalog.
Parameters
ctx
A context.
playtime Params
The PlaytimeParams object to pass the User-Acquisition(UA) fields and placement
Throws
When the catalog is not available.
fun getCatalogIntent(ctx: Context, playtimeParams: PlaytimeParams?, listener: PlaytimeCatalogIntentListener)
Asynchronously prepares the Intent to launch the Catalog displaying the catalog.
Use it like this:
Playtime.getCatalogIntent(activity, playtimeParams, object : PlaytimeCatalogIntentListener {
override fun onCatalogIntentReady(intent: Intent) {
activity.startActivity(intent)
}
override fun onError(error: PlaytimeException) {
// the catalog cannot be displayed for some reason
}
})
Parameters
ctx
A context.
playtime Params
The PlaytimeParams object to pass the User-Acquisition(UA) fields and placement
listener
A listener which notifies you when the Intent is ready or if there was an error.