Initialize
Before launching ArcPlay, have your app initialize the ArcPlay SDK by calling ArcplayPlugin.Init()
. This needs to be done only once, ideally at app launch.
Initialization method:
Here's an example of how to call ArcplayPlugin.Init()
within the Start()
method of a script attached to a GameObject
:
The callback from ArcplayPlugin.Init()
can be used to check the accessibility of the ArcPlay.ai experience and accordingly enable or disable the entry point nudge.
onSuccess()
- Enable the ArcPlay.ai nudgeonFailure()
- Disable the ArcPlay.ai nudge
Below mentioned are the definitions of InitConfig
constructor parameters:
accountId
string
Yes
A unique identifier for your publisher account shared by ArcPlay.ai team at the time of onboarding
NOTE: ArcPlay.ai customer success team will provide each publisher with distinct accountId
for facilitating the development and production use cases.
userId
string
Yes
The unique identifier of users inside your application's environment.
clientId
string
No
The unique identifier for app instances. This is used when users is not logged in your app.
NOTE: If you set clientId
in the InitConfig
then userId
is NOT mandatory
gdprFlag
bool
No
true
for users from EU which have exercised Data Subject Rights under GDPR. Else false
.
ccpaFlag
bool
No
true
for users from USA which have exercised Data Subject Rights under CCPA. Else false
.
coppaFlag
bool
No
true
for users from USA which are under the age of 16 years. Else false
.
googleFamilyProgramFlag
bool
No
true
for users which have opted-in for the Google Family Program. Else false
.
NOTE:
If any of the
InitConfig
parameters changes after the user hasArcplayPlugin.Init
then update theInitConfig
and again doArcplayPlugin.Init
The set
userId
, will be used to award virtual currency (reward) to the user. If set incorrectly, the users will not be rewarded.The
userId
andclientId
can be up to 190 characters long.For data security and GDPR compliance purposes,
userId
should not include any recognizable or identifiable information, such as a username, real name, or email address.For security and fraud detection purposes, the
userId
should be constant for the user's lifetime.The Error callback can be because of the following cases:
300
Disabled by ArcPlay.ai team
301
Blocked User
Particular user has been blocked for fraudulent activities
302
Age restricted
A non-adult user has been blocked
303
EU restricted
A user from EU has been blocked as he has exercised Data Subject Rights under GDPR
304
Ads SDK not initialized
Ads mediation sdk instance was not found (eg: AdMob, Ironsource etc)
305
Servers unreachable
ArcPlay.ai servers are not accessible. The team is notified of the issue and working on fixing it
306
Incorrect Inputs
accountId
or userId
provided is null
307
Failed to process
Internal error. The team is notified of the issue and working on fixing it
308
Duplicate Request
InitConfig
called before getting callback from ArcplayPlugin.Init
400
Init Succeeded, Launch Failed!
ArcplayPlugin.Init
was successful but ArcplayPlugin.Launch
has failed
Last updated