请教台电T720-3GE如何升级安卓系统_百度知道游戏平台接入文档 – 备注 : 豌豆荚开发者中心
游戏平台接入文档 – 备注
备注1:Alipay_lib_resource引入
1、在您的工程所在的空间下,将电脑上保存的 alipay_lib_resource 以 lib_project 方式引入。
流程图如下:
点击ok即引用完成。
备注2:MarioPluginApplication.java 添加
1. 如果游戏没有application声明:
将demo中的MarioPluginApplication.java复制到游戏的package目录。(文件的目录在src/com/wandoujia/mariosdk/plugin/demo/MarioPluginApplication.java)
将文件的import改成游戏的package
修改游戏的APP_KEY和SECURITY_KEY
2. 如果游戏已有application的声明:
将以下内容添加至游戏的application中
①需要将MarioPluginApplication.java中attachBaseContext中得方法拷贝到对应的attachBaseContext中,注意initPlugin需要在super.attachBaseContext之前
②需要将MarioPluginApplication.java中onCreate中得方法拷贝到对应的onCreate中,注意Builder需要在super.onCreate之前
package XXX;
// 游戏的package
import android.app.A
import android.content.C
import com.wandoujia.mariosdk.plugin.api.api.WandouGamesA
public class MarioPluginApplication extends Application {
private static final long APP_KEY = ;
//填入游戏的appKey
private static final String SECURITY_KEY = "8a0cd8df3c7a48b5cd8cafcdc8a70ae0";
//填入游戏的securityKey
private static WandouGamesApi wandouGamesA
public static WandouGamesApi getWandouGamesApi() {
return wandouGamesA
protected void attachBaseContext(Context base) {
WandouGamesApi.initPlugin(base, APP_KEY, SECURITY_KEY);
super.attachBaseContext(base);
public void onCreate() {
wandouGamesApi = new WandouGamesApi.Builder(this, APP_KEY, SECURITY_KEY).create();
super.onCreate();
123456789101112131415161718192021222324252627282930
package XXX;&& // 游戏的package&import android.app.Application;import android.content.Context;&import com.wandoujia.mariosdk.plugin.api.api.WandouGamesApi;&public class MarioPluginApplication extends Application {&&&private static final long APP_KEY = ;&&&& //填入游戏的appKey&&private static final String SECURITY_KEY = "8a0cd8df3c7a48b5cd8cafcdc8a70ae0";&& //填入游戏的securityKey&&&private static WandouGamesApi wandouGamesApi;&&&public static WandouGamesApi getWandouGamesApi() {&&&&return wandouGamesApi;&&}&&&@Override&&protected void attachBaseContext(Context base) {&&&&WandouGamesApi.initPlugin(base, APP_KEY, SECURITY_KEY);&&&&super.attachBaseContext(base);&&}&&&@Override&&public void onCreate() {&&&&wandouGamesApi = new WandouGamesApi.Builder(this, APP_KEY, SECURITY_KEY).create();&&&&super.onCreate();&&}}
备注3:AndroidManifest.xml 的声明
复制粘贴后,一定要修改:
application的name标签,指向应刚才引入的application文件。
OakenshieldActivity中得intent-filter 中的XXX 替换成自己的appKey
&uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&
&uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&
&uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /&
&uses-permission android:name="android.permission.GET_ACCOUNTS" /&
&uses-permission android:name="android.permission.INTERNET" /&
&uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /&
&uses-permission android:name="android.permission.READ_PHONE_STATE" /&
&uses-permission android:name="android.permission.USE_CREDENTIALS" /&
&uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&
&uses-permission android:name="android.permission.READ_CONTACTS" /&
&uses-permission android:name="android.permission.SEND_SMS" /&
&uses-permission android:name="android.permission.READ_SMS" /&
&uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/&
&uses-permission android:name="android.permission.GET_TASKS" /&
&uses-permission android:name="android.permission.GET_TOP_ACTIVITY_INFO" /&
&uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /&
&uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /&
&uses-permission android:name="android.permission.WRITE_SETTINGS" /&
&application
android:allowBackup="true"
android:name=".MarioPluginApplication"&
&!-- 必须添加! 如果项目有application,这里可以替换成项目现存的application --&
&!-- 豌豆荚Game SDK activity, service,receiver 声明 --&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.MarioAccountActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop" /&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.UserInfoSettingActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop"
android:screenOrientation="portrait" /&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.LeaderboardActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:launchMode="singleTop"
android:screenOrientation="portrait" /&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.AchievementActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:launchMode="singleTop"
android:screenOrientation="portrait" /&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.InviteActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Light.NoTitleBar"
android:launchMode="singleTop"
android:screenOrientation="portrait" /&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.MiniProfileActivity"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTop"
android:screenOrientation="portrait" /&
android:name="com.wandoujia.mariosdk.plugin.apk.activity.MarioActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop"
android:screenOrientation="landscape" /&
android:name="com.wandoujia.mariosdk.plugin.apk.fantasy.activity.FFActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTop"
android:screenOrientation="landscape" /&
&receiver android:name="com.wandoujia.mariosdk.plugin.api.WandouPluginReceiver"&
&intent-filter&
&action android:name="android.net.conn.CONNECTIVITY_CHANGE" /&
&action android:name="pheonix.intent.action.LOGIN_SUCCESS" /&
&action android:name="pheonix.intent.action.REGISTER_SUCCESS" /&
&action android:name="pheonix.intent.action.LOGOUT_SUCCESS" /&
&/intent-filter&
&/receiver&
&service android:name="com.wandoujia.mariosdk.plugin.api.WandouPluginService" /&
Wandou Pay SDK plugin --&
android:name="com.wandoujia.oakenshield.activity.OakenshieldActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:windowSoftInputMode="adjustResize"
android:theme="@android:style/Theme.Translucent.NoTitleBar"&
&intent-filter&
&action android:name="com.wandoujia.oakenshield"/&
&category android:name="android.intent.category.DEFAULT"/&
&strong&&!-- Make sure to replace XXX by your AppKeyid ,like this --&&/strong&
&data android:scheme="Wandoujia-PaySdk-"/&
&data android:scheme="Wandoujia-PaySdk-XXX"/&
&/intent-filter&
&/activity&
&!-- Alipay SDK begin --&
android:name="com.alipay.android.mini.window.sdk.MiniLaucherActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:excludeFromRecents="true"
android:launchMode="singleTop"
android:theme="@style/MspAppTheme"/&
android:name="com.alipay.android.mini.window.sdk.TransContainer"
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:excludeFromRecents="true"
android:launchMode="singleTop"
android:theme="@style/MspAppTheme"/&
&!-- 极简收银台主界面 --&
android:name="com.alipay.android.mini.window.sdk.MiniPayActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:excludeFromRecents="true"
android:label="@string/msp_app_name"
android:launchMode="singleTop"
android:theme="@style/MspAppTheme"
android:windowSoftInputMode="adjustResize"&
&intent-filter android:priority="800"&
&action android:name="android.intent.action.MAIN"/&
&category android:name="android.intent.category.DEFAULT"/&
&/intent-filter&
&/activity&
&!-- 极简收银台链接查看界面 --&
android:name="com.alipay.android.mini.window.sdk.MiniWebActivity"
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:excludeFromRecents="true"
android:launchMode="singleTop"
android:theme="@style/MspAppTheme"&
&intent-filter&
&action android:name="android.intent.action.MAIN"/&
&category android:name="android.intent.category.DEFAULT"/&
&/intent-filter&
&/activity&
&!-- 快捷支付服务 --&
&service android:name="com.alipay.android.app.MspService"/&
&!-- UTDID --&
android:name="com.ut.device.BQueryWhoHasOne"
android:exported="true"
android:permission="com.ut.permission.DEVICE_STATE"&
&intent-filter&
&action android:name="UT.QueryWhoHasOne"/&
&/intent-filter&
&/receiver&
android:name="com.ut.device.BFoundIt"
android:exported="true"
android:permission="com.ut.permission.DEVICE_STATE"&
&intent-filter&
&action android:name="UT.FoundIT"/&
&/intent-filter&
&/receiver&
&!-- Alipay SDK end --&
&!-- UnionPay start --&
android:label="@string/app_name"
android:name="com.unionpay.uppay.PayActivityEx"
android:excludeFromRecents="true"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation"
android:windowSoftInputMode="adjustResize"&
&intent-filter&
&action android:name="android.intent.action.Run"/&
&category android:name="android.intent.category.DEFAULT"/&
&/intent-filter&
&intent-filter&
&action android:name="android.intent.action.VIEW"/&
&category android:name="android.intent.category.BROWSABLE"/&
&category android:name="android.intent.category.DEFAULT"/&
&data android:scheme="uppay"/&
&/intent-filter&
&/activity&
&service android:name="com.UCMobile.PayPlugin.PayPluginService"&
&intent-filter&
&action android:name="android.webkit.PLUGIN"/&
&/intent-filter&
&meta-data
android:name="type"
android:value="native"/&
&/service&
&activity android:name="com.unionpay.uppay.PayActivity"&
&/activity&
&!-- UnionPay end --&
&!-- 豌豆荚Game SDK activity, service,receiver 声明结束 --&
&/application&
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
&&&&&uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&&&&&&uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&&&&&&uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /&&&&&&uses-permission android:name="android.permission.GET_ACCOUNTS" /&&&&&&uses-permission android:name="android.permission.INTERNET" /&&&&&&uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /&&&&&&uses-permission android:name="android.permission.READ_PHONE_STATE" /&&&&&&uses-permission android:name="android.permission.USE_CREDENTIALS" /&&&&&&uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&&&&&&uses-permission android:name="android.permission.READ_CONTACTS" /&&&&&&uses-permission android:name="android.permission.SEND_SMS" /&&&&&&uses-permission android:name="android.permission.READ_SMS" /&&&&&&uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/&&&&&&uses-permission android:name="android.permission.GET_TASKS" /&&&&&&uses-permission android:name="android.permission.GET_TOP_ACTIVITY_INFO" /&&&&&&uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /&&&&&&uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /&&&&&&uses-permission android:name="android.permission.WRITE_SETTINGS" /&&&&&&&application&&&&&&&&android:allowBackup="true"&&&&&&&&android:name=".MarioPluginApplication"&&& &!-- 必须添加! 如果项目有application,这里可以替换成项目现存的application --&&&&&&&&&&&!-- 豌豆荚Game SDK activity, service,receiver 声明 --&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.MarioAccountActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Translucent.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.UserInfoSettingActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Translucent.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="portrait" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.LeaderboardActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Light.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="portrait" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.AchievementActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Light.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="portrait" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.InviteActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Light.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="portrait" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.MiniProfileActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="portrait" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.activity.MarioActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Translucent.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="landscape" /&&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.mariosdk.plugin.apk.fantasy.activity.FFActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden"&&&&&&&&&&&&android:theme="@android:style/Theme.Translucent.NoTitleBar"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:screenOrientation="landscape" /&&&&&&&&&&&receiver android:name="com.wandoujia.mariosdk.plugin.api.WandouPluginReceiver"&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="android.net.conn.CONNECTIVITY_CHANGE" /&&&&&&&&&&&&&&&&&&action android:name="pheonix.intent.action.LOGIN_SUCCESS" /&&&&&&&&&&&&&&&&&&action android:name="pheonix.intent.action.REGISTER_SUCCESS" /&&&&&&&&&&&&&&&&&&action android:name="pheonix.intent.action.LOGOUT_SUCCESS" /&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/receiver&&&&&&&&&&&service android:name="com.wandoujia.mariosdk.plugin.api.WandouPluginService" /&&&&&&&&& &!--&&Wandou Pay SDK plugin --&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.wandoujia.oakenshield.activity.OakenshieldActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden|screenSize"&&&&&&&&&&&&android:windowSoftInputMode="adjustResize"&&&&&&&&&&&&android:theme="@android:style/Theme.Translucent.NoTitleBar"&&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="com.wandoujia.oakenshield"/&&&&&&&&&&&&&&&&&&&category android:name="android.intent.category.DEFAULT"/&&&&&&&&&&&&&&&&&&strong&&!-- Make sure to replace XXX by your AppKeyid ,like this --&&/strong&&&&&&&&&&&&&&&&&&!--&&&data android:scheme="Wandoujia-PaySdk-"/&&&--&&&&&&&&&&&&&&&&&&data android:scheme="Wandoujia-PaySdk-XXX"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/activity&&&&&&&&&&&!-- Alipay SDK begin --&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.alipay.android.mini.window.sdk.MiniLaucherActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden|navigation|screenSize"&&&&&&&&&&&&android:excludeFromRecents="true"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:theme="@style/MspAppTheme"/&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.alipay.android.mini.window.sdk.TransContainer"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden|navigation|screenSize"&&&&&&&&&&&&android:excludeFromRecents="true"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:theme="@style/MspAppTheme"/&&&&&&&&&&!-- 极简收银台主界面 --&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.alipay.android.mini.window.sdk.MiniPayActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden|navigation|screenSize"&&&&&&&&&&&&android:excludeFromRecents="true"&&&&&&&&&&&&android:label="@string/msp_app_name"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:theme="@style/MspAppTheme"&&&&&&&&&&&&android:windowSoftInputMode="adjustResize"&&&&&&&&&&&&&&intent-filter android:priority="800"&&&&&&&&&&&&&&&&&&action android:name="android.intent.action.MAIN"/&&&&&&&&&&&&&&&&&&&category android:name="android.intent.category.DEFAULT"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/activity&&&&&&&&&&!-- 极简收银台链接查看界面 --&&&&&&&&&&activity&&&&&&&&&&&&android:name="com.alipay.android.mini.window.sdk.MiniWebActivity"&&&&&&&&&&&&android:configChanges="orientation|keyboardHidden|navigation|screenSize"&&&&&&&&&&&&android:excludeFromRecents="true"&&&&&&&&&&&&android:launchMode="singleTop"&&&&&&&&&&&&android:theme="@style/MspAppTheme"&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="android.intent.action.MAIN"/&&&&&&&&&&&&&&&&&&&category android:name="android.intent.category.DEFAULT"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/activity&&&&&&&&&&!-- 快捷支付服务 --&&&&&&&&&&service android:name="com.alipay.android.app.MspService"/&&&&&&&&&&!-- UTDID --&&&&&&&&&&receiver&&&&&&&&&&&&android:name="com.ut.device.BQueryWhoHasOne"&&&&&&&&&&&&android:exported="true"&&&&&&&&&&&&android:permission="com.ut.permission.DEVICE_STATE"&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="UT.QueryWhoHasOne"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/receiver&&&&&&&&&&receiver&&&&&&&&&&&&android:name="com.ut.device.BFoundIt"&&&&&&&&&&&&android:exported="true"&&&&&&&&&&&&android:permission="com.ut.permission.DEVICE_STATE"&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="UT.FoundIT"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/receiver&&&&&&&&&&&!-- Alipay SDK end --&&&&&&&&&&!-- UnionPay start --&&&&&&&&&&activity&&&&&&&&&&&&android:label="@string/app_name"&&&&&&&&&&&&android:name="com.unionpay.uppay.PayActivityEx"&&&&&&&&&&&&android:excludeFromRecents="true"&&&&&&&&&&&&android:screenOrientation="portrait"&&&&&&&&&&&&android:configChanges="keyboardHidden|orientation"&&&&&&&&&&&&android:windowSoftInputMode="adjustResize"&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="android.intent.action.Run"/&&&&&&&&&&&&&&&&&&category android:name="android.intent.category.DEFAULT"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="android.intent.action.VIEW"/&&&&&&&&&&&&&&&&&&&category android:name="android.intent.category.BROWSABLE"/&&&&&&&&&&&&&&&&&&category android:name="android.intent.category.DEFAULT"/&&&&&&&&&&&&&&&&&&&data android:scheme="uppay"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&/activity&&&&&&&&&&service android:name="com.UCMobile.PayPlugin.PayPluginService"&&&&&&&&&&&&&&intent-filter&&&&&&&&&&&&&&&&&&action android:name="android.webkit.PLUGIN"/&&&&&&&&&&&&&&/intent-filter&&&&&&&&&&&&&&meta-data&&&&&&&&&&&&&&&&android:name="type"&&&&&&&&&&&&&&&&android:value="native"/&&&&&&&&&&/service&&&&&&&&&&activity android:name="com.unionpay.uppay.PayActivity"&&&&&&&&&&/activity&&&&&&&&&&!-- UnionPay end --&&&&&&&& &!-- 豌豆荚Game SDK activity, service,receiver 声明结束 --&&&&&&&/application&
备注4:设置平台方向
请保证游戏的方向与SDK的方向一致
如果要使用横屏界面,就将AndroidManifest.xml中的android:screenOrientation=”portrait”替换成android:screenOrientation=”landscape”
如果要使用竖屏界面,就将AndroidManifest.xml中的android:screenOrientation=”landscape”替换成的android:screenOrientation=”portrait”
备注5:初始化
在程序的第一个 activity 的 onCreate 方法中调用 wandouGamesApi.init(this) 初始化
在程序的每一个 activity 的 onResume 和 onPause 中调用用 wandouGamesApi 对应的 onResume 和 onPause 方法,保证 SDK 插件化的正常运行。
private WandouGamesApi wandouGamesA
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
wandouGamesApi = MarioPluginApplication.getWandouGamesApi();
wandouGamesApi.init(this);
protected void onResume() {
super.onResume();
wandouGamesApi.onResume(this);
protected void onPause() {
super.onPause();
wandouGamesApi.onPause(this);
12345678910111213141516171819202122
&&private WandouGamesApi wandouGamesApi;&&&@Override&&protected void onCreate(Bundle savedInstanceState) {&&&&super.onCreate(savedInstanceState);&&&&setContentView(R.layout.main);&&&&&wandouGamesApi = MarioPluginApplication.getWandouGamesApi();&&&&wandouGamesApi.init(this);&&}&&&@Override&&protected void onResume() {&&&&super.onResume();&&&&wandouGamesApi.onResume(this);&&}&&&@Override&&protected void onPause() {&&&&super.onPause();&&&&wandouGamesApi.onPause(this);&&}
备注:混淆设置
在这里为设置过混淆的游戏提供混淆解决方案(未设置混淆的游戏不必看)
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-ignorewarnings
-printseeds
-dontoptimize
-keepattributes Exceptions
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-keepattributes *Annotation*
-keepattributes InnerClasses
-keepattributes Signature
-libraryjars libs/weibo.sdk.android.sso.jar
-libraryjars libs/android-support-v4.jar
-libraryjars libs/disklrucache-2.0.2.jar
-libraryjars libs/mario-plugin.jar
-libraryjars libs/pinyin4android1.0.jar
-libraryjars libs/simcore.jar
-libraryjars libs/trove-1.0.2.jar
-libraryjars libs/javaxdelta-2.0.1.jar
-assumenosideeffects class android.util.Log{
public static int v(...);
public static int i(...);
public static int w(...);
public static int d(...);
public static int e(...);
public static boolean isLoggable(java.lang.String, int);
-assumenosideeffects class * extends java.lang.Throwable {
public void printStackTrace();
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class * extends android.view.View
-keep public class * extends android.os.IInterface
-keep class android.media.* { *; }
-keep public class com.android.internal.telephony.* { *; }
-keep public class android.os.storage.* { *; }
-keep public class android.content.pm.* { *; }
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
-keep class com.wandoujia.gson.** { *; }
-keep public class m.ftp.SessionThread
-keep public class m.ftp.FtpCmd
-keep public class com.tencent.mm.sdk.openapi.WXMediaMessage { *; }
-keep class * implements com.tencent.mm.sdk.openapi.WXMediaMessage$IMediaObject { *; }
-keep public class com.wandoujia.p4.sync.photo.data.* { *; }
-keep public class * extends com.wandoujia.pmp.impls.PMPServiceImpl {
public protected private *;
-keepclasseswithmembers class * {
native &methods&;
-keepclasseswithmembers class * {
public &init&(android.content.Context, android.util.AttributeSet);
-keepclasseswithmembers class * {
public &init&(android.content.Context, android.util.AttributeSet, int);
-keepclasseswithmembers class * {
public &init&(m.ftp.SessionThread, java.lang.String);
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
-keep class * implements java.io.Serializable {
-keep class *.R
-keepclasseswithmembers class **.R$* {
public static &fields&;
-keep public class android.net.http.SslError{
-keep public class android.webkit.WebViewClient{
-keep public class android.webkit.WebChromeClient{
-keep public interface android.webkit.WebChromeClient$CustomViewCallback {
-keep public interface android.webkit.ValueCallback {
-keep class * implements android.webkit.WebChromeClient {
-keep class * implements com.wandoujia.p4.campaign.JsInterface{
-keep class * extends com.squareup.wire.Message {
-keep class * extends com.squareup.wire.Message$Builder {
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
-keep class com.nineoldandroids.** { *; }
-keep interface com.nineoldandroids.** { *; }
-keep class com.twmacinta.util.MD5State {*;}
-dontwarn android.support.**
-dontwarn android.net.http.SslError
-dontwarn android.webkit.WebViewClient
# for account sdk
-keep interface com.wandoujia.account.IAccountListener
-keep interface com.wandoujia.account.IAccountSMSProcessListener
-keep interface com.wandoujia.account.IBindListener
-keep interface com.wandoujia.account.ISmsSender
-keep interface com.wandoujia.account.ISocialLoginListener
-keep interface com.wandoujia.account.IAccountProcessListener
-keep class com.wandoujia.account.dto.** { *; }
# exclude payment sdk part.
-keep class com.wandoujia.p4.payment.** { *; }
-keep interface com.wandoujia.p4.payment.** { *; }
# exclude alipay within payment sdk.
-keep class com.unipay.** { *; }
-keep class com.wandoujia.message.SmsSender {*;}
-keep class com.alipay.android.app.** { *; }
# exclude the whole v4 package to align with payment dex.
-keep class android.support.v4.** { *; }
-keep class com.wandoujia.paysdk.** { *; }
-keep class com.wandoujia.oakenshield.** { *; }
# keep 3rd jars begin
-keep class com.weibo.sdk.** { *; }
-keep interface com.weibo.sdk.** { *; }
-keep class com.jakewharton.disklrucache.** { *; }
-keep interface com.jakewharton.disklrucache.** { *; }
-keep class gnu.trove.** { *; }
-keep interface gnu.trove.** { *; }
-keep class at.spardat.xma.xdelta.** { *; }
-keep interface
at.spardat.xma.xdelta.** { *; }
-keep class com.nothome.delta.** { *; }
-keep interface
com.nothome.delta.** { *; }
-keep class com.pingyin4android.** { *; }
-keep interface
com.pingyin4android.** { *; }
-keep class com.sim.core.** { *; }
-keep interface
com.sim.core.** { *; }
-keep class com.sina.sso.** { *; }
-keep interface
com.sina.sso.** { *; }
# keep 3rd jars end
-keep class com.wandoujia.** { *; }
-keep interface com.wandoujia.** { *; }
-keep class com.wandoujia.mariosdk.plugin.apk.api.** { *; }
-keep class com.wandoujia.mariosdk.plugin.apk.resources.** { *; }
-keep class com.wandoujia.mariosdk.plugin.apk.receiver.** { *; }
-keep class com.wandoujia.mariosdk.plugin.apk.service.** { *; }
-keep interface com.wandoujia.mariosdk.plugin.apk.api.** { *; }
-keep interface com.wandoujia.mariosdk.plugin.apk.resources.** { *; }
-keep class com.wandoujia.mariosdk.plugin.api.model.** { *; }
-keep interface com.wandoujia.mariosdk.plugin.api.model.** { *; }
-keep class com.wandoujia.mariosdk.plugin.api.api.** { *; }
-keep interface com.wandoujia.mariosdk.plugin.api.api.** { *; }
-keep class com.wandoujia.mariosdk.plugin.api.CallbackAdapter { *; }
-keep public class com.wandoujia.pluginframework.PluginFrameworkInitor {
public &methods&;
-keep public class com.wandoujia.pluginframework.PluginManager {
public &methods&;
-keep class com.wandoujia.pluginframework.Plugin { *; }
-keep class com.wandoujia.pluginframework.config.PluginItem { *; }
-keep interface com.wandoujia.pluginframework.config.ConfigLoader { *; }
-keep enum&!--more--&&!--more--& com.wandoujia.pluginframework.config.PluginType { *; }
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-verbose-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*-ignorewarnings-printseeds&-dontoptimize-keepattributes Exceptions-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-renamesourcefileattribute SourceFile-keepattributes SourceFile,LineNumberTable&-keepattributes *Annotation*-keepattributes InnerClasses-keepattributes Signature&-libraryjars libs/weibo.sdk.android.sso.jar-libraryjars libs/android-support-v4.jar-libraryjars libs/disklrucache-2.0.2.jar-libraryjars libs/mario-plugin.jar-libraryjars libs/pinyin4android1.0.jar-libraryjars libs/simcore.jar-libraryjars libs/trove-1.0.2.jar-libraryjars libs/javaxdelta-2.0.1.jar&-assumenosideeffects class android.util.Log{&&&&public static int v(...);&&&&public static int i(...);&&&&public static int w(...);&&&&public static int d(...);&&&&public static int e(...);&&&&public static boolean isLoggable(java.lang.String, int);}&-assumenosideeffects class * extends java.lang.Throwable {&&&&public void printStackTrace();}&-keep public class * extends android.app.Activity-keep public class * extends android.app.Application-keep public class * extends android.app.Service-keep class * extends android.content.BroadcastReceiver-keep public class * extends android.content.ContentProvider-keep public class * extends android.app.backup.BackupAgentHelper-keep public class * extends android.preference.Preference-keep public class * extends android.view.View-keep public class * extends android.os.IInterface-keep class android.media.* { *; }-keep public class com.android.internal.telephony.* { *; }-keep public class android.os.storage.* { *; }-keep public class android.content.pm.* { *; }-keep public class * extends android.support.v4.app.Fragment-keep public class * extends android.app.Fragment&-keep class com.wandoujia.gson.** { *; }-keep public class com.wandoujia.comm.ftp.SessionThread-keep public class com.wandoujia.comm.ftp.FtpCmd&-keep public class com.tencent.mm.sdk.openapi.WXMediaMessage { *; }-keep class * implements com.tencent.mm.sdk.openapi.WXMediaMessage$IMediaObject { *; }&-keep public class com.wandoujia.p4.sync.photo.data.* { *; }&-keep public class * extends com.wandoujia.pmp.impls.PMPServiceImpl {&&&&public protected private *;}&-keepclasseswithmembers class * {&&&&native &methods&;}&-keepclasseswithmembers class * {&&&&public &init&(android.content.Context, android.util.AttributeSet);}&-keepclasseswithmembers class * {&&&&public &init&(android.content.Context, android.util.AttributeSet, int);}&-keepclasseswithmembers class * {&&&&public &init&(com.wandoujia.comm.ftp.SessionThread, java.lang.String);}&-keepclassmembers enum * {&&&&public static **[] values();&&&&public static ** valueOf(java.lang.String);}&-keep class * implements android.os.Parcelable {&&&&public static final android.os.Parcelable$Creator *;}&-keep class * implements java.io.Serializable {&&&&*;}&-keep class *.R&-keepclasseswithmembers class **.R$* {&&&&public static &fields&;}&-keep public class android.net.http.SslError{&&&&*;}&-keep public class android.webkit.WebViewClient{&&&&*;}&-keep public class android.webkit.WebChromeClient{&&&&*;}&-keep public interface android.webkit.WebChromeClient$CustomViewCallback {&&&&*;}&-keep public interface android.webkit.ValueCallback {&&&&*;}&-keep class * implements android.webkit.WebChromeClient {&&&&*;}&-keep class * implements com.wandoujia.p4.campaign.JsInterface{&&&&*;}-keep class * extends com.squareup.wire.Message {&&&&*;}-keep class * extends com.squareup.wire.Message$Builder {&&&&*;}&-keep class com.actionbarsherlock.** { *; }-keep interface com.actionbarsherlock.** { *; }-keep class com.nineoldandroids.** { *; }-keep interface com.nineoldandroids.** { *; }-keep class com.twmacinta.util.MD5State {*;}-dontwarn android.support.**-dontwarn android.net.http.SslError-dontwarn android.webkit.WebViewClient for account sdk-keep interface com.wandoujia.account.IAccountListener-keep interface com.wandoujia.account.IAccountSMSProcessListener-keep interface com.wandoujia.account.IBindListener-keep interface com.wandoujia.account.ISmsSender-keep interface com.wandoujia.account.ISocialLoginListener-keep interface com.wandoujia.account.IAccountProcessListener-keep class com.wandoujia.account.dto.** { *; } exclude payment sdk part.-keep class com.wandoujia.p4.payment.** { *; }-keep interface com.wandoujia.p4.payment.** { *; }# exclude alipay within payment sdk.-keep class com.unipay.** { *; }-keep class com.wandoujia.message.SmsSender {*;}-keep class com.alipay.android.app.** { *; }# exclude the whole v4 package to align with payment dex.-keep class android.support.v4.** { *; }&-keep class com.wandoujia.paysdk.** { *; }-keep class com.wandoujia.oakenshield.** { *; } keep 3rd jars begin&-keep class com.weibo.sdk.** { *; }-keep interface com.weibo.sdk.** { *; }&-keep class com.jakewharton.disklrucache.** { *; }-keep interface com.jakewharton.disklrucache.** { *; }&-keep class gnu.trove.** { *; }-keep interface gnu.trove.** { *; }&-keep class at.spardat.xma.xdelta.** { *; }-keep interface&&at.spardat.xma.xdelta.** { *; }&-keep class com.nothome.delta.** { *; }-keep interface&&com.nothome.delta.** { *; }&-keep class com.pingyin4android.** { *; }-keep interface&&com.pingyin4android.** { *; }&-keep class com.sim.core.** { *; }-keep interface&&com.sim.core.** { *; }&-keep class com.sina.sso.** { *; }-keep interface&&com.sina.sso.** { *; } keep 3rd jars end&-keep class com.wandoujia.** { *; }-keep interface com.wandoujia.** { *; }-keep class com.wandoujia.mariosdk.plugin.apk.api.** { *; }-keep class com.wandoujia.mariosdk.plugin.apk.resources.** { *; }-keep class com.wandoujia.mariosdk.plugin.apk.receiver.** { *; }-keep class com.wandoujia.mariosdk.plugin.apk.service.** { *; }-keep interface com.wandoujia.mariosdk.plugin.apk.api.** { *; }-keep interface com.wandoujia.mariosdk.plugin.apk.resources.** { *; }&-keep class com.wandoujia.mariosdk.plugin.api.model.** { *; }-keep interface com.wandoujia.mariosdk.plugin.api.model.** { *; }&-keep class com.wandoujia.mariosdk.plugin.api.api.** { *; }-keep interface com.wandoujia.mariosdk.plugin.api.api.** { *; }&-keep class com.wandoujia.mariosdk.plugin.api.CallbackAdapter { *; }&-keep public class com.wandoujia.pluginframework.PluginFrameworkInitor {&&&&public &methods&;}&-keep public class com.wandoujia.pluginframework.PluginManager {&&&&public &methods&;}&-keep class com.wandoujia.pluginframework.Plugin { *; }&-keep class com.wandoujia.pluginframework.config.PluginItem { *; }&-keep interface com.wandoujia.pluginframework.config.ConfigLoader { *; }&-keep enum&!--more--&&!--more--& com.wandoujia.pluginframework.config.PluginType { *; }
如果您需要更多帮助,请在此提交,我们将在 1 个工作日内回复。
获得帮助或提供反馈
邮件支持:
企业 QQ:400 652 8705