Launch

Simple

To launch ArcPlay.ai experience add the below-mentioned code to onClick of ArcPlay.ai nudge.

Arcplay.launch(context /* activity context */)
Parameter
Data type
Mandatory

context

Activity

Yes

contentId

String

No (details in Advanced section)

Arcplay.launch will return a boolean value

  1. true - ArcPlay.ai experience is successfully launched

  2. false - ArcPlay.ai experience failed to launch. This will be returned in the following cases

    • user is offline

    • Arcplay.init has not been called yet

    • Arcplay.init is still in progress

    • Arcplay.init has returned onFailure()

Advanced

To directly launch ArcPlay content pages (e.g. opening a game) from your app, add the below-mentioned code to onClick of ArcPlay.ai nudge.

Depending on what contentId you pass, the respective content page will be opened directly for the user. If contentId is set to null, the default homepage will open.

Example: If you pass g:d955ecdc-1d12-4d8c-88ee-2b79ec23a431 as the contentId, the 'Fruit Knife' game will be opened for the user

2. Init & Launch

To launch Arcplay without pre-initialization, you can call the below function (initAndLaunch) to initialize and launch ArcPlay in one go.

Last updated