Migration 1.49.7 to 1.50.*
Migration from 1.49.28 to 1.50.0
remove func
Platform101XP.getAccountProperties();
//webUIWidjet funcs
Platform101XP.helpDialog();
Platform101XP.newsDialog();
add func
Platform101XP.getAccount();
change in Platform101XPToken
- all id move to Platform101XPAccount
- 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.
change in Platform101XPAccount
- add accountId, portalId, userGameId, mobileId, isGuest(for detect auth guest)
- remove properties
- remove email
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.49.27 to 1.49.28
For Robokassa in manifest in application need add
<activity
android:name="com.platform101xp.sdk.internal.billing.robokassa.RobokassaBillingActivity"
android:exported="true" />
Migration from 1.49.25 to 1.49.26
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"
}
}
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"
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'
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.*'
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21"
...
}
}
changes in interface Platform101XPListener
change func in Platform101XPListener
[removed]
void onPurchaseProductXsollaResult(String productId, Platform101XPBillingConfig.XsollaStatus status, Platform101XPError error);
[add]
void onPurchaseProductInternalOrderResult(String productId, Platform101XPBillingConfig.InternalOrderStatus status, Platform101XPError error);
For import
import com.platform101xp.sdk.internal.billing.Platform101XPBillingConfig;
new func in Platform101XPListener
void onPurchaseProductInternalOrderResult(String productId, Platform101XPBillingConfig.InternalOrderStatus status, Platform101XPError error){
if (error != null) {
showMessage("Error onPurchaseProductInternalOrderResult: " + error.toString());
} else {
if (status == Platform101XPBillingConfig.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());
}
}
}
Migration from 1.49.21 to 1.49.22
Since version 1.49.22 and higher compileSdkVersion and buildToolsVersion up to 33 And Kotlin version to 1.8.*
buildscript {
...
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21"
...
}
}
dependencies {
...
compileSdkVersion 33
buildToolsVersion '33.0.0'
...
}
Migration from 1.49.15 to 1.49.16
add new func in Platform101XPListener
void onGetAccountResult(Platform101XPAccount account, Platform101XPError error);
@Override
public void onGetAccountResult(Platform101XPAccount account, Platform101XPError error) {
if (error==null && account != null) {
}
}
Migration from 1.49.11 to 1.49.12
add new func in Platform101XPListener
void onCheckMobilePurchase(String itemName, boolean bought, Platform101XPError error);
@Override
public void onCheckMobilePurchase(String itemName, boolean bought, Platform101XPError error) {
if (error != null) {
// Handle an error
if (error.getErrorType() == Platform101XPError.ErrorType.ERROR_NOT_AUTHORIZED)
Platform101XP.authorize();
} else {
// Web Store result check bought param
}
}
Migration from 1.49.7 to 1.49.8
changes in gradle.build
minSdkVersion minimal version rise to 21
minSdkVersion 21
changes in interface Platform101XPListener
add new func in Platform101XPListener void onPurchaseProductXsollaResult(String productId, Platform101XPBillingConfig.XsollaStatus status, Platform101XPError error);
For import
import com.platform101xp.sdk.internal.billing.Platform101XPBillingConfig;
new func in Platform101XPListener
void onPurchaseProductXsollaResult(String productId, Platform101XPBillingConfig.XsollaStatus status, Platform101XPError error){
if (error != null) {
showMessage("Error onPurchaseProductXsollaResult: " + error.toString());
} else {
if (status == Platform101XPBillingConfig.XsollaStatus.COMPLETED) {
//reward user, complete purchase
Log.d(Platform101XP.LOG_TAG, "onPurchaseProductXsollaResult COMPLETED");
} else {
Log.d(Platform101XP.LOG_TAG, "onPurchaseProductXsollaResult productId:" + productId + " status:"+status.name());
}
}
}
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.