Commit 05bcef797c5ba4930cd61b56df50e288ad7128ca

Authored by 赵康
1 parent 305f038e7b
Exists in master

增加Google登录

Showing 7 changed files with 10 additions and 7 deletions Side-by-side Diff

GameSDK-ND-release4.2.0.aar
No preview for this file type
GameSDK-release4.1.7.aar
No preview for this file type
GameSDKDemo/build.gradle
... ... @@ -33,5 +33,5 @@ dependencies {
33 33 testCompile 'junit:junit:4.12'
34 34 compile 'com.android.support:appcompat-v7:22.2.0'
35 35 // compile project(':GameSDK')
36   - compile(name:'GameSDK-release4.1.6',ext:'aar')
  36 + compile(name:'GameSDK-ND-release4.2.0',ext:'aar')
37 37 }
GameSDKDemo/libs/GameSDK-ND-release4.2.0.aar
No preview for this file type
GameSDKDemo/libs/GameSDK-release4.1.7.aar
No preview for this file type
GameSDKDemo/src/main/java/com/gumptech/sdk/demo/MainActivity.java
... ... @@ -30,7 +30,7 @@ public class MainActivity extends Activity implements PurchaseCallback {
30 30 private Button btnLoginOrLogout;
31 31  
32 32 private String appId = "10022";
33   - private String appKey = "7e0ff37942c2de60cbcbd27041196ce3";
  33 + private String appKey = "93a27b0bd99bac3e68a440b48aa421ab";
34 34 private String sessionKey;
35 35  
36 36  
... ... @@ -125,6 +125,9 @@ public class MainActivity extends Activity implements PurchaseCallback {
125 125 case GumpPreference.ACCOUNT_TYPE_VK:
126 126 userType = "vk登录";
127 127 break;
  128 + case GumpPreference.ACCOUNT_TYPE_GOOGLE:
  129 + userType = "Google登录";
  130 + break;
128 131 }
129 132 userInfo.setText(" Userid:" + user.getUid() + "\n accountType:(" + user.getAccountType() + ") " + userType + "\n sessionKey:" + user.getSessionKey());
130 133 btnLoginOrLogout.setText("Logout");
... ... @@ -152,7 +155,7 @@ public class MainActivity extends Activity implements PurchaseCallback {
152 155 /**
153 156 * 初始化sdk
154 157 */
155   - GumpSDK.init(getApplicationContext(), appId, appKey, "1003", new InitializeCallback() {
  158 + GumpSDK.init(getApplicationContext(), appId, appKey, "1000", new InitializeCallback() {
156 159 @Override
157 160 public void initComplete(int result) {
158 161 if (result == GumpSDK.CODE.OK) {
1 1 # Gump SDK 4 for Android接入文档
2 2  
3   -V4.1.5
4   -2017年3月10日
  3 +V4.2.0
  4 +2017年4月26日
5 5  
6 6 ## 版本概述
7 7  
... ... @@ -155,7 +155,7 @@ InitializeCallback为初始化回调接口,此接口只有一个回调方法init
155 155  
156 156  
157 157 #### 3.支付功能
158   -1)使用gump通行证登录,其中除nick和roleId外所有参数为必传参数
  158 +1)使用gump通行证登录,其中除nick外所有参数为必传参数
159 159  
160 160 Bundle payInfo = new Bundle();
161 161 payInfo.putString("nick", "thi");
... ... @@ -169,7 +169,7 @@ InitializeCallback为初始化回调接口,此接口只有一个回调方法init
169 169 调用pay方法时,必须穿入一个bundle对象,包含如上字段,除nick和roleId外所有字段必须全部包含,其中sessionKey为登录时返回的sessionKey
170 170  
171 171  
172   -2)IAP支付,roleId为可选参数,其他参数必传
  172 +2)IAP支付
173 173  
174 174 Bundle payInfo = new Bundle();
175 175 payInfo.putString("product", "gp_skuId");