Skip to main content
Version: 2.x.x

Configure

App configuration

Add app_config_name, client_id to AndroidManifest.xml.

Please, ask your release manager for app_config_name, client_id values

caution

For app_config_name use the name in lowercase.

For example: use some_game_name not Some_Game_Name.

<meta-data
android:name="com.platform101xp.sdk.app_config_name"
android:value="@string/app_config_name" />

<meta-data
android:name="com.platform101xp.sdk.client_id"
android:value="@string/client_id" />

Setting up authorization providers

Users can authorize via the 101XP platform and social networks (Facebook, Vkontakte, Odnoklassniki, Google) or use a guest account.

Setting up checking token

Token checking

Setting up automatic authorization

Automatic authorization is turned on by default.

If you need to turn off the automatic authorization, add the value auto_login_enabled = false to AndroidManifest:

<meta-data
android:name="com.platform101xp.sdk.auto_login_enabled"
android:value="false" />

Guest authorization button

Guest authorization button is turned on by default.

To manage this option you need to add the following metadata to your AndroidManifest:

<meta-data
android:name="com.platform101xp.sdk.guest_enabled"
android:value="@bool/guest_enabled"/>
caution

If automatic authorization is turned on, the guest authorization button will be displayed.

If you need to check whether a user has been authorized as a guest, use method isGuest()

if (Platform101XP.isGuest()) {
//TODO something
}

Setting up EULA window

The EULA window is displayed by default.

To turn it on\off you need to add license_agreement_enabled to AndroidManifest.

To change default url use license_agreement_url.

To turn it on\off you need to add license_agreement_auto_accept to AndroidManifest. (default: false)

If license_agreement_enabled == false and license_agreement_auto_accept == true your analytics be send always without EULA window but if license_agreement_enabled == true auto accept not working. Only handle user's Accept.

<meta-data android:name="com.platform101xp.sdk.license_agreement_enabled"
android:value="@bool/eula_show_enabled"/>
<meta-data android:name="com.platform101xp.sdk.license_agreement_url"
android:value="@string/eula_url" />
<meta-data android:name="com.platform101xp.sdk.license_agreement_auto_accept"
android:value="@bool/eula_auto_accept" />

Setting up a warning about linking a social network

This dialog is turned on by default and is shown to a user every 24h if they use a guest account.

To turn it on\off you need to add guest_timeout_enabled to AndroidManifest:

<meta-data
android:name="com.platform101xp.sdk.guest_timeout_enabled"
android:value="@bool/guest_timeout_enabled"/>

Enable device token support

A device token is a long-lived token for a user session associated with a device. Turned off by default.

To turn it on\off you need to add device_token_enabled to AndroidManifest:

<meta-data
android:name="com.platform101xp.sdk.device_token_enabled"
android:value="@bool/device_token_enabled" />

Setting up disabling rotation for authorization window

To fix orientation in a horizontal position or vertical position, use the corresponding option. All options are false by default.

<meta-data
android:name="com.platform101xp.sdk.screenlock_horizontal"
android:value="false" />
<meta-data
android:name="com.platform101xp.sdk.screenlock_vertical"
android:value="false" />

And also change the parameter screen_rotation_disabled to true. The default is false.

<meta-data android:name="com.platform101xp.sdk.screen_rotation_disabled"
android:value="true" />