更新日期:2017年 12月 01日QuickSDK-Java(Android)
<h3 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:18px;font-family:'微软雅黑',sans-serif">1. Examing project before access</span></strong></h3><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">There are some requirements that QuickSDK suggest to game project</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">the following problems after game accessed QuickSDK,</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">· Android:targetSdkVersion of AndroidManifest.xml ="19"</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Fix the problem that market sdk is incompatible to android 5.0</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">· If there is installLocation in AndroidManifest.xml, parameter set as auto</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">To solve the problem that APK can not be installed</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">· The Activity in AndroidManifest.xml shall configured as followed</span></strong></p><pre class="brush:java;toolbar:false">android:configChanges="keyboardHidden|orientation|screenSize"</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">In case of the landscape-portrait swichover problem that may happened between game and market sdk.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">·U3D game project ,AndroidManifest.xml</span></strong></p><pre class="brush:java;toolbar:false"><meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" /></pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Android: value set as true</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">· Add Landscape-portrait screen setting for Activity</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:宋体">Activity Landscape-portrait screen according to game screen orientation</span></p><pre class="brush:java;toolbar:false">android:screenOrientation="sensorLandscape"
android:screenOrientation="sensorPortrait"</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:宋体">or</span></p><pre class="brush:java;toolbar:false">android:screenOrientation="landscape"
android:screenOrientation="portrait"</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">· Component path in AndroidManifest.xml such as Activity is full path</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">All contents under “com.quicksdk” class path will be deleted when packing market package if you used the class path “com.quicksdk” when create game project.</span></strong></p><h3 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:18px;font-family:'微软雅黑',sans-serif">2.Access process</span></strong></h3><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.1 Add resource</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Loading QuickSDK resource(</span><a href="http://www.quicksdk.com/download.html"><span style=";font-family:'微软雅黑',sans-serif">http://www.quicksdk.com/download.html</span></a><span style=";font-family:'微软雅黑',sans-serif">), and copy assets,libs and res to project corresponding files.</span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.2 Add authority</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Adding authority in Androidmanifest.xml</span></p><pre class="brush:java;toolbar:false"><uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /></pre><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.3 Add QuickSdkApplication</span></strong></h4><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:black">2.3.1 Create game application</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">The creating game Application inherit from QuickSdkApplication</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"></span></p><pre class="brush:java;toolbar:false">public class GameApplication extends QuickSdkApplication {
@Override
public void onCreate() {
super.onCreate();
}
}</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"></span><br/></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.3.2 Add Application to AndroidManifest.xml</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Application nude in AndroidManifest.xml, modifying android:name nature, whose value is full path of game new creating Application.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"></span></p><pre class="brush:java;toolbar:false"><application
android:name="*.*.*.GameApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
......
</application></pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> <br/></span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.4 Add splash screen</span></strong></h4><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:black">2.4.1 Create game splash screen Activity</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Create game splash screen Activity</span><span style=";font-family:'微软雅黑',sans-serif">,which is inherit from QuickSdkSplashActivity</span></p><pre class="brush:java;toolbar:false">public class SplashActivity extends QuickSdkSplashActivity {
@Override
public int getBackgroundColor() {
return Color.WHITE;
}
@Override
public void onSplashStop() {
//turn to game interface after splash screen stopped
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
this.finish();
}
}</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif"></span></strong><br/></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.4.2 Add splash screen Activity to AndroidManifest.xml</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"><activity</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> android:name="*.*.*.SplashActivity"</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> android:configChanges="keyboardHidden|orientation|screenSize"</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> android:screenOrientation="landscape" ></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> <intent-filter></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> <action android:name="android.intent.action.MAIN" /></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> <category android:name="android.intent.category.LAUNCHER" /></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </intent-filter></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"></activity></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:宋体">Instruction</span></strong><strong><span style=";font-family:宋体">:</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:宋体">android:name nature</span><span style=";font-family:宋体">,whose value is full path of game-defined splash screen activity.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:宋体">android:screenOrientation nature</span><span style=";font-family:宋体">, whose value decided the screen orientation according to game needs.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.5 Life cycle processing</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Game Activity life cycle processing, call corresponding method.</span></p><pre class="brush:java;toolbar:false">@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
com.quicksdk.Sdk.getInstance().onCreate(this);
}
@Override
protected void onStart() {
super.onStart();
com.quicksdk.Sdk.getInstance().onStart(this);
}
@Override
protected void onRestart() {
super.onRestart();
com.quicksdk.Sdk.getInstance().onRestart(this);
}
@Override
protected void onPause() {
super.onPause();
com.quicksdk.Sdk.getInstance().onPause(this);
}
@Override
protected void onResume() {
super.onResume();
com.quicksdk.Sdk.getInstance().onResume(this);
}
@Override
protected void onStop() {
super.onStop();
com.quicksdk.Sdk.getInstance().onStop(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
com.quicksdk.Sdk.getInstance().onDestroy(this);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
com.quicksdk.Sdk.getInstance().onNewIntent(intent);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
com.quicksdk.Sdk.getInstance().onActivityResult(this, requestCode, resultCode, data);
}</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000"></span></strong><br/></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.6 QuickSDK initialized setting</span></strong></h4><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.6.1 Set initialized notification( necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:QuickSDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public QuickSDK setInitNotifier(InitNotifier notifier)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">:Setting initialized result callback notification before game started, Started game log in etc and relevant processes once initialized successfully.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">QuickSDK.getInstance().setInitNotifier(new InitNotifier() {
@Override
public void onSuccess() {
//initialized succeed
}
@Override
public void onFailed(String message, String trace) {
//initialized failed
}
});</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.6.2 Set log in notification (necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:QuickSDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public QuickSDK setLoginNotifier(LoginNotifier notifier)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Setting relevant processing of user log in result callback notification.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">QuickSDK.getInstance().setLoginNotifier(new LoginNotifier() {
@Override
public void onSuccess(UserInfo userInfo) {
// log in succeed, get user information userInfo
// certificate server log in through UID, token of userInfo
}
@Override
public void onCancel() {
//log in cancel
}
@Override
public void onFailed(final String message, String trace) {
//log in failed
}
});</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Log in information</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">UserInfo</span></strong><span style=";font-family:'微软雅黑',sans-serif"> </span></p><table cellpadding="0" cellspacing="0" width="408"><tbody><tr class="firstRow"><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="34"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Field</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="23"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">type</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="104"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Instruction</span></p></td></tr><tr><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="34"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">UID</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="23"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="104"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">User ID</span><span style="font-size:16px;font-family:'微软雅黑',sans-serif">, the only ID that SDK returned to</span></p></td></tr><tr><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="34"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">username</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="23"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="104"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">User name</span></p></td></tr><tr><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="34"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">token</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="23"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border:solid #7F7F7F 1px;padding:0 7px 0 7px" width="104"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Verifying user token</span></p></td></tr></tbody></table><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirements</span></strong><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">:</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">1</span></strong><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">)Initiate game, received log in succeed notification in login interface, then skip to game interface;</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">2</span></strong><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">)When game client call auto login receiving login fail/cancel notification, shall call login function again.</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">3</span></strong><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">)Different markets may return same UID, the only method that game client use to identify user is ID+UID. To obtain market ID by “public int getChannelType()”</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.6.3 Set log out notification(necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:QuickSDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public QuickSDK setLogoutNotifier(LogoutNotifier notifier)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Set process such as user log out result , callback notification</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">QuickSDK.getInstance().setLogoutNotifier(new LogoutNotifier() {
@Override
public void onSuccess() {
//log out succeed
}
@Override
public void onFailed(String message, String trace) {
// log out fail, no processing
}
});</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement: Receiving log out succeed notification , game shall return to login interface.</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.6.4 Set switch account notification(necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:QuickSDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public QuickSDK setSwitchAccountNotifier(SwitchAccountNotifier notifier)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">:Set the processing of user switch account result callback notification.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">QuickSDK.getInstance().setSwitchAccountNotifier(new SwitchAccountNotifier() {
@Override
public void onSuccess(UserInfo userInfo) {
// userInfo Switch account succeed, return to new account userInfo
}
@Override
public void onCancel() {
//Switch account cancel
}
@Override
public void onFailed(String message, String trace) {
//Switch account fail
}
})</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Switch account succeed information</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">UserInfo</span></strong></p><table cellpadding="0" width="408"><tbody><tr class="firstRow"><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="25"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">Field</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="19"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">Type</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="117"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">Instruction</span></p></td></tr><tr><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="25"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">UID</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="19"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">String</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="117"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">User ID,the only ID that SDK returned</span></p></td></tr><tr><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="25"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">username</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="19"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">String</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="117"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">User login name </span></p></td></tr><tr><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="25"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">token</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="19"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">String</span></p></td><td style="border:solid #7F7F7F 1px;padding:1px 1px 1px 1px" valign="top" width="117"><p style="text-align: left; line-height: 3em;"><span style="font-size:16px;font-family: 宋体">User verify token</span></p></td></tr></tbody></table><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement:</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red"> In game interface</span></strong><span style="font-size:16px;font-family:宋体"> ,</span><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">receiving switch account succeed notification, game client log out current role, using new user information, back to access game interface.</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red"> </span></strong><strong><span style=";font-family:'微软雅黑',sans-serif">2.6.5 Set fixed payment notification (necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:QuickSDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public QuickSDK setPayNotifier(PayNotifier notifier)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Set relevant process of user payment result callback notification</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif"></span><strong>:</strong></p><pre class="brush:java;toolbar:false">QuickSDK.getInstance().setPayNotifier(new PayNotifier() {
@Override
public void onSuccess(String sdkOrderID, String cpOrderID,
String extrasParams) {
//Paid succeed
//sdkOrderID:quick Order number cpOrderID:Game client order number
}
@Override
public void onCancel(String cpOrderID) {
//payment cancel
}
@Override
public void onFailed(String cpOrderID, String message, String trace) {
//payment fail
}
});</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red"></span></strong><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Instruction: Whether the game recharge succeed according to the only official notification from server.(Since some market SDK may not send the correct notification , the client notification is not that reliable)</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.6.6 Set exit notification(necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:QuickSDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public QuickSDK setExitNotifier(ExitNotifier notifier)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Set relevant process of user exit result callback notification.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">QuickSDK.getInstance().setExitNotifier(new ExitNotifier() {
@Override
public void onSuccess() {
// exit succeed, exit process itself
}
@Override
public void onFailed(String message, String trace) {
// Exit fail, no processing
}
});</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement: Game exit processing itself after receiving exit succeed notification.</span></strong></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">2.7 Call market SDK API</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement: Call SDK API under UI main thread.</span></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.7.1 SDK initialization (necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Sdk</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public void init(Activity activity, String productCode, String productKey)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">:Market SDK initialization</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Parameter</span><span style=";font-family:'微软雅黑',sans-serif">:activity always the current Activity</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">productCode always the productCode which is applied in QuickSDK background </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> productKey always productKey which is applied in QuickSDK background</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体">Example:</span></p><pre class="brush:java;toolbar:false">com.quicksdk.Sdk.getInstance().init(activity, " productCode applied in background", " productKey applied in background ");</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement: Initializing API shall be called onCreate method of Activity</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.7.2 Login account (necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.User</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public void login(Activity activity)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Call market SDK login</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Parameter</span><span style=";font-family:'微软雅黑',sans-serif">:activity always current Activity</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span>:</p><pre class="brush:java;toolbar:false">User.getInstance().login(activity);</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red"></span></strong><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement: Entering login interface, autocall this API, and call login API after initialized succeed.</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.7.3 Uploading role information(necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Name</span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.User</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public void setGameRoleInfo(Activity activity, GameRoleInfo roleInfo, boolean createRole)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Uploading role information to Market SDK</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Parameter</span><span style=";font-family:'微软雅黑',sans-serif">:activity always current Activity</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">roleInfo always role information</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">createRole always if create role</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">// GameRoleInfo field, it must be transferred once there are parameters of game in GameRoleInfo field,and it’s unnecessary to transfer the parameters which are not in GameRoleInfo field.
GameRoleInfo roleInfo = new GameRoleInfo();
roleInfo.setServerID("1");// number string , which can not including Chinese character.
roleInfo.setServerName("server 1");
roleInfo.setGameRoleName("stone");
roleInfo.setGameRoleID("1121121");
roleInfo.setGameBalance("5000");
roleInfo.setVipLevel("4"); // Setting the current users VIP level which must be integer string.
roleInfo.setGameUserLevel("12"); // Setting game user level
roleInfo.setPartyName("Unstoppable"); // Setting party name
roleInfo.setRoleCreateTime("1473141432"); // There are 3 market must transfer, they are UC.com,dangle.com and 1881.com respectively, and the value is 10 digit timestamp.
roleInfo.setPartyId("1100"); // 360.com parameters, set party ID which must be integer string.
roleInfo.setGameRoleGender("male"); //market 360/360.com parameter
roleInfo.setGameRolePower("38"); // 360.com parameter, set role power,which must be integer string.
roleInfo.setPartyRoleId("11"); // 360.com parameter ,set party role id.
roleInfo.setPartyRoleName("party leader"); // 360.com parameter set party role name.
roleInfo.setProfessionId("38"); // 360.com parameter,set role profession id which must be integer string.
roleInfo.setProfession("master"); // 360.com parameter , set role profession name.
roleInfo.setFriendlist("no"); //360.com parameter, set friend list,format refer to:http://open.quicksdk.net/help/detail/aid/190</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Creating Role</span></p><pre class="brush:java;toolbar:false">User.getInstance().setGameRoleInfo(activity, roleInfo, true);</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> </span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Entering game and updating role</span></p><pre class="brush:java;toolbar:false">User.getInstance().setGameRoleInfo(activity, roleInfo, false);</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> </span><br/></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> <strong> GameRoleInfo</strong></span></p><table cellpadding="0" cellspacing="0" width="408"><tbody><tr class="firstRow"><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">string</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">type</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Instructino</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">serverID</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">server ID(number string)</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">serverName</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">server name</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">gameRoleName</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Game Role name</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">gameRoleID</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Game Role ID</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">gameRoleBalance</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Game role balance</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">vipLevel</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">VIP level</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">gameRoleLevel</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">game role level</span></p></td></tr><tr><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="73"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">partyName</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="94"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Party </span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">roleCreateTime</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">role create time (10 digit timestamp)</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">partyId</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Party id</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">gameRoleGender</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Game role gender</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">gameRolePower</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Role power</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">partyRoleId</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Party role ID</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">partyRoleName</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Party role name </span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">professionId</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Role profession ID</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">profession</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Role profession name</span></p></td></tr><tr><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="73"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">friendlist</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="43"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif;background:#FCFCFC">String</span></p></td><td style="border:solid windowtext 1px;padding:0 0 0 0" valign="top" width="94"><p style="text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Friend list</span></p></td></tr></tbody></table><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access instruction:</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">1) Call this API when creating role, entering game and updating role. createRole value is true while creating game role, for the rest situations—entering game or updating role, the value is false.</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">2) All strings in GameRoleInfo can not transfer null , if there is no such string, transfer default value or null string.</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red;background:#F7FAFF">3) In roleCreateTime field, only UC.com and 1881.com must transfer this parameter, whose value is 10 digit timestamp.</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red;background:#FCFCFC">4)</span></strong><strong><span style=";font-family:'微软雅黑',sans-serif;color:red;background:#F7FAFF"> It is necessarily for 360.com to transfer these 8 fields --partyId,gameRoleGender,gameRolePower,partyRoleId,partyRoleName,professionId,profession,friendlist,only transfer the fields which included in game, other markets do not need to transfer them.</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red;background:#F7FAFF">5) Specific instruction of uploading role information to 360.com, refer to :http://open.quicksdk.net/help/detail/aid/190</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.7.4 Fixed payment(necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class </span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Payment</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method </span><span style=";font-family:'微软雅黑',sans-serif">:public void pay(final Activity activity, final OrderInfo orderInfo, final GameRoleInfo roleInfo)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: call market SDK pay</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Parameter</span><span style=";font-family:'微软雅黑',sans-serif">:activity always current Activity</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">orderInfo always order information</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">roleInfo always role information</span></p><p style="margin-top:auto;margin-bottom: auto;text-align:left;line-height:48px"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">GameRoleInfo roleInfo = new GameRoleInfo();
roleInfo.setServerID("1");//number string
roleInfo.setServerName("server1");
roleInfo.setGameRoleName("stone");
roleInfo.setGameRoleID("1121121");
roleInfo.setGameUserLevel("12");
roleInfo.setVipLevel("Vip4");
roleInfo.setGameBalance("5000");
roleInfo.setPartyName("xxparty");
OrderInfo orderInfo = new OrderInfo();
orderInfo.setCpOrderID("20150917003200119310");
orderInfo.setGoodsName("yuanbao");// goods name without quantity
orderInfo.setCount(60);// game currency quantity
orderInfo.setAmount(6);
orderInfo.setGoodsID("1");
orderInfo.setExtrasParams("extra parameter");
Payment.getInstance().pay(activity, orderInfo, roleInfo);</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif"><br/></span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">payment information parameter form</span><span style="font-size:16px;font-family:'微软雅黑',sans-serif">:</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">OrderInfo</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style="font-size:16px;font-family:宋体"> </span></p><table cellpadding="0" cellspacing="0" width="408"><tbody><tr class="firstRow"><td style="border: 1px solid windowtext; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">field</span></p></td><td style="border-width: 1px 1px 1px medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">type</span></p></td><td style="border-width: 1px 1px 1px medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">instruction</span></p></td></tr><tr><td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">goodsID</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Goods ID, identifying the purchased goods.</span></p></td></tr><tr><td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">goodsName</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">goods name</span></p></td></tr><tr><td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">cpOrderID</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Goods order number( game client order number)</span></p></td></tr><tr><td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">count</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">int</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">game currency quantity</span></p></td></tr><tr><td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">amount</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">double</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Total amount(¥)</span></p></td></tr><tr><td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border-image: none; padding: 0px 7px;" valign="top" width="71"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">extrasParams</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="43"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">String</span></p></td><td style="border-width: medium 1px 1px medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0px 7px;" valign="top" width="95"><p style="margin-top: auto; margin-bottom: auto; text-align: center; line-height: 3em;"><span style="font-size:16px;font-family:'微软雅黑',sans-serif">Extras parameter</span></p></td></tr></tbody></table><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">In order to unify all market goods name, orders should be transferred in by following patterns:</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example 1</span><span style=";font-family:'微软雅黑',sans-serif">: Example2:</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">amount:6.0 amount:10.0</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">count:60 count:1</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">goodsName: yuanbao goodsName: month card</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">Access requirement</span></strong><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">:</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">· GoodsName transferred in “month card”,”diamond”,”yuanbao”pattern without quantity;</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">· Field Count in OrderInfo stands for game currency quantity.</span></strong></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif;color:red">·All fields in OrderInfo, GameRoleInfo can not transfer null, if there’s no such field in game transferring a default value or null string/empty string.</span></strong></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.7.5 Log out (necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.User</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public void logout(Activity activity)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: market SDK log out.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example:</span></p><pre class="brush:java;toolbar:false">User.getInstance().logout(activity);</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif"></span></strong><br/></p><h5 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style=";font-family:'微软雅黑',sans-serif">2.7.6 Exit (necessarily)</span></strong></h5><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class</span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Sdk</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public void exit(Activity activity)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: Market SDK exit, when game server is in exiting logic, we can judge if there is exitdialog by isShowExitDialog API. Call QuickSDK exit API directly if there is exit dialog; call exit dialog by game itself, click “yes”,then call QuickSDK exit API if there’s no exit dialog in market.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:</span></p><pre class="brush:java;toolbar:false">// Judging if there is exit dialog in market SDK by isShowExitDialog
if(QuickSDK.getInstance().isShowExitDialog()){
Sdk.getInstance().exit(activity);
}else{
// call exit dialog of game, click “yes”,then call quick exit API
new AlertDialog.Builder(MainActivity.this).setTitle("退出").setMessage("if exit game?").setPositiveButton("yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
Sdk.getInstance().exit(MainActivity.this);
}
}).setNegativeButton("cancel", null).show();
}</pre><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"></span><br/></p><h3 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:18px;font-family:'微软雅黑',sans-serif">3. Expansion API</span></strong></h3><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">3.1 Obtain market type</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class </span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Extend</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method</span><span style=";font-family:'微软雅黑',sans-serif">:public int getChannelType()</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">:obtain market number</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Instruction</span><span style=";font-family:'微软雅黑',sans-serif">:Market ID</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:Extend.getInstance().getChannelType();</span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">3.2 Obtain configuration parameter value</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class </span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Extend</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method </span><span style=";font-family:'微软雅黑',sans-serif">:public String getExtrasConfig(String key)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">:obtain configuration parameter value</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Instruction</span><span style=";font-family:'微软雅黑',sans-serif">:Operating game defined parameter configuration in quicksdk.xml files, change it when packaging according to the rules.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:Extend.getInstance().getExtrasConfig("key");</span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">3</span></strong><strong><span style="font-size:16px;font-family:宋体;color:#FFC000">.</span></strong><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">3 Supporting designated method?</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class </span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Extend</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method </span><span style=";font-family:'微软雅黑',sans-serif">:public boolean isFunctionSupported(final int funcType)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: whether it supports designated method.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Instruction</span><span style=";font-family:'微软雅黑',sans-serif">: There are functions in some SDK such as open/close floating tool bar, enter user center, enter forum; it can be used for judging whether it support the designated method during gaming;definition of designated method refer to SDK lib com.quicksdk.FuncType.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example </span><span style=";font-family:'微软雅黑',sans-serif">:Extend.getInstance().isFunctionSupported(FuncType.HIDE_TOOLBAR); // if it support hiding floating dialog function</span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">3.4 Call designated method</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Class </span><span style=";font-family:'微软雅黑',sans-serif">:com.quicksdk.Extend</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Method :public String callFunction(final Activity activity, final int funcType)</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Function</span><span style=";font-family:'微软雅黑',sans-serif">: call designated method</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Instruction</span><span style=";font-family:'微软雅黑',sans-serif">: There are functions such as display/hide floating button, enter user center, enter forum, it can call third party market supporting method before using isFunctionSupported to judge.</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Example</span><span style=";font-family:'微软雅黑',sans-serif">:Extend.getInstance().callFunction(activity, FuncType.HIDE_TOOLBAR); // call hide floating dialog method</span></p><h3 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:18px;font-family:'微软雅黑',sans-serif">4.others</span></strong></h3><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">4.1 About mix </span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">QuickSDK has been through mixed, if java code is mixed, do not mix the bider classes in jar package. And it can add following class to proguard configuration, excluding the mix:</span></p><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">-keep class com.quicksdk.** { *; }</span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">4.2 configure self-defined parameter</span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif">Once there are some needs for game client to set relevant market parameter, it can add self-defined parameter through quick background, configure corresponding value in market list, then obtain the value through Extend.getInstance().getExtrasConfig(String key).</span></p><h4 style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><strong><span style="font-size:16px;font-family:'微软雅黑',sans-serif;color:#FFC000">4.3 test requirement </span></strong></h4><p style="margin-top: auto; margin-bottom: auto; text-align: left; line-height: 3em;"><span style=";font-family:'微软雅黑',sans-serif"> All API access succeed, there is the origin package, which is the test example for testing, and when it passed test, there is the correct market package.</span></p><p><br/></p>