Skip to main content
Version: Next

Migration 1.48. to 3.0.

Migration from 3.0.30 to 3.0.*

Due to the update of vk-sdk to 4.1.0, there is no longer a need to add com.vk.sdk.VKServiceActivity and in general it was cut out in the SDK. If you used authorization via VK Please Remove from your manifest

<activity android:name="com.vk.sdk.VKServiceActivity"
android:label="ServiceActivity"
android:theme="@style/VK.Transparent" />

Migration from 3.0.25 to 3.0.*

In Advertising Module add flag enable/disable Admob and IronSource, default flags disable

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

Migration from 2.0. to 3.0.

compileSdk and targetSdkVersion minimal version rise to 34

    compileSdk 34

minSdkVersion minimal version rise to 21

    targetSdkVersion 34

Change your MainActivity extends with Activity to AppCompatActivity, because in version SDK 3.0.0 use Jetpack Compose for Dialog Window

// Java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Platform101XP.onCreate(this); // (this -> acitivity extends AppCompatActivity only!)
}
//webUIWidjet funcs
Platform101XP.helpDialog();
Platform101XP.newsDialog();

remove func

Platform101XP.getAccountProperties();

add func

Platform101XP.getAccount();

change in Platform101XPToken

  • all id move to Platform101XPAccount
  • getAccessToken.getId() -> getAccessToken() in Platform101XPToken
  • remove refreshToken & all info about refresh
  • remove socialId
  • remove deprecated userId
  • remove hasBind
  • isGuest change, for detect user guest auth use isGuest varible in Platform101XPAccount.

Platform101XPToken

change in Platform101XPAccount

  • add accountId, portalId, userGameId, mobileId, isGuest(for detect auth guest)
  • rename to Account
  • remove properties
  • remove email

Account

info

remove all function for WebUI101XPWidjet

change in manifest (AndroidManifest.xml)

  • remove com.platform101xp.sdk.device_token_enabled, all tokens is a long-lived token.

webUIWidjet params

  • remove com.platform101xp.sdk.screenlock_horizontal
  • remove com.platform101xp.sdk.screenlock_vertical
  • remove com.platform101xp.sdk.screen_rotation_disabled
  • remove com.platform101xp.sdk.web_ui_version
  • remove com.platform101xp.sdk.web_ui_enabled

Migration from 1.48. to 2.0.

There were no functional changes. Calling remain the same. All static functions in Platform101xp remained the same.

changes in gradle.build

compileSdk and buildToolsVersion minimal version rise to 33 and 33.0.0

    compileSdk 33
buildToolsVersion '33.0.0'

minSdkVersion minimal version rise to 21

    minSdkVersion 21

changes in dependicaes

from

implementation 'com.platform101xp:platform101xp-sdk:X.XX.X'

to

implementation 'com.platform101xp:sdk:3.XX.XX'
implementation 'com.platform101xp:advertising:3.XX.XX'
implementation 'com.platform101xp:api:3.XX.XX'
implementation 'com.platform101xp:authorization:3.XX.XX'
implementation 'com.platform101xp:base:3.XX.XX'
implementation 'com.platform101xp:billing:3.XX.XX'
implementation 'com.platform101xp:utils:3.XX.XX'

remove and change Activity

remove

com.platform101xp.sdk.internal.billing.robokassa.RobokassaBillingActivity
com.platform101xp.sdk.AuthorizationActivity
com.platform101xp.sdk.internal.receivers.Platform101XPInstallReferrerReceiver
com.platform101xp.sdk.internal.dialogs.webdialogs.Platform101XPWebFragmentActivity
com.platform101xp.sdk.internal.receivers.Platform101XPNetworkReceiver
com.platform101xp.sdk.internal.services.Platform101XPAndroidMessagingService

change

com.platform101xp.sdk.internal.socialnetworks.Platform101XPInviteActivity

to

com.platform101xp.authorize.social_networks.activity.InviteActivity

changes in class path

  1. Platform101XPPurchase from
import com.platform101xp.sdk.Platform101XPPurchase;

to

import com.platform101xp.billing.dto.Platform101XPPurchase;
  1. Platform101XPProduct from
import com.platform101xp.sdk.Platform101XPProduct;

to

import com.platform101xp.billing.dto.Platform101XPProduct;
  1. Platform101XPError from
import com.platform101xp.sdk.Platform101XPError;

to

import com.platform101xp.base.error.Platform101XPError;
  1. Platform101XPError.ErrorType and change name to BaseErrorType from
import com.platform101xp.sdk.Platform101XPError;

to

import com.platform101xp.base.error.BaseErrorType;
  1. Platform101XPSNType from
import com.platform101xp.sdk.Platform101XPSNType;

to

import com.platform101xp.authorize.social_networks.utils.Platform101XPSNType;
  1. Platform101XPToken from
import com.platform101xp.sdk.Platform101XPToken;

to

import com.platform101xp.authorize.token.Platform101XPToken;
  1. Platform101XPSocialFriend from
import com.platform101xp.sdk.entities.Platform101XPSocialFriend;

to

import com.platform101xp.authorize.social_networks.entities.Platform101XPSocialFriend;
  1. Platform101XPAccount to Account from
import com.platform101xp.sdk.internal.Platform101XPAccount;

to

import com.platform101xp.authorize.account.Account;

changes Initialization

func Platform101XP.onCreate(Activity activity); change to Platform101XP.onCreate(AppCompatActivity activity); because SDK version use Jetpack Compose and lifecyrcle runtime use activity extends from AppCompatActivity

from

Platform101XP.onCreate(Activity activity);

to

Platform101XP.onCreate(AppCompatActivity activity);

changes static func for call in Platform101xp

remove functions

Platform101XP.onSaveInstanceState(Bundle savedInstanceState);
Platform101XP.onRestoreInstanceState(Bundle savedInstanceState);
Platform101XP.onStart(Activity activity);
Platform101XP.onResume(Activity activity);
Platform101XP.onPause(Activity activity);
Platform101XP.onDestroy(Activity activity);

changes in interface Platform101XPListener

add new func in Platform101XPListener

void onPurchaseProductInternalOrderResult(String productId, InternalOrderStatus status, Platform101XPError error);

void onCheckMobilePurchase(String itemName, boolean bought, Platform101XPError error);

void onGetAccountResult(Account account, Platform101XPError error);

For import

import com.platform101xp.billing.internal.InternalOrderStatus;
import com.platform101xp.authorize.account.Account;
import com.platform101xp.base.error.BaseErrorType;

new functions in Platform101XPListener

void onPurchaseProductInternalOrderResult(String productId, InternalOrderStatus status, Platform101XPError error){
if (error != null) {
showMessage("Error onPurchaseProductInternalOrderResult: " + error.toString());
} else {
if (status == InternalOrderStatus.PAYED) {
//reward user, complete purchase
Log.d(Platform101XP.LOG_TAG, "onPurchaseProductInternalOrderResult COMPLETED");
} else {
Log.d(Platform101XP.LOG_TAG, "onPurchaseProductInternalOrderResult productId:" + productId + " status:"+status.name());
}
}
}

@Override
public void onCheckMobilePurchase(String itemName, boolean bought, Platform101XPError error) {
if (error != null) {
// Handle an error
if (error.getErrorType() == BaseErrorType.ERROR_NOT_AUTHORIZED)
Platform101XP.authorize();
} else {
// Web Store result check bought param
}
}

@Override
public void onGetAccountResult(Account account, Platform101XPError error) {
if (error==null && account != null) {

}
}

remove functions

void onRewardedAdLoaded();
void onRewardedAdShowed(int amount, String name, Platform101XPError error);
void onOfferwallAdLoaded();
void onOfferwallAdCredits(Map<String, String> creditInfo, Platform101XPError error);

manifest change for Facebook

For Facebook in manifest need add

<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="$your_facebook_client_token"/>

Please, ask your manager for Facebook ClientToken

manifest&build.gradle change for Yookassa

For Yookassa in manifest in YourMainActivity inside <intent-filter> need add

<data android:scheme="mobilesdkxp"/>


//example
<activity
android:name="YourMainActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

...
...
<data android:scheme="mobilesdkxp"/>
</intent-filter>
</activity>

And add in your build.gradle(application level)

android {
...
defaultConfig {
...
resValue "string", "ym_app_scheme", "mobilesdkxp"
}
}

gradle-wrapper & gradle-plugin up version

If your application contains kotlin gradle plugin please set his version >= 1.8.* gradle-wrapper up with '7.0.2' to '7.3.3'

gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Gadle Plugin up with '7.0.4' to '7.2.2' and Kotlin Plugin with '1.6.*' to '1.8.*'

build.gradle (project level):
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21"
...
}
}
info

if you build error write

Dublicate class kotlin.*.jdk8.* found in modules jetified-kotlin-stdlib-

just add in dependencies

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21"