Commit b15ca2ecf145b7af210857c929b2e773d7cf7837

Authored by kingzh
Exists in master

Merge branch 'master' of http://117.50.8.198/document/gamesdk4-android

# Conflicts:
#	GameSDKDemo/build.gradle
#	GameSDKDemo/src/main/java/com/gump/game/sdk/demo/MainActivity.java

Showing 3 changed files Side-by-side Diff

GameSDKDemo/build.gradle
... ... @@ -36,7 +36,7 @@ repositories {
36 36 }
37 37  
38 38 android {
39   - compileSdkVersion 28
  39 + compileSdkVersion 30
40 40 buildToolsVersion '28.0.3'
41 41  
42 42 signingConfigs {
... ... @@ -50,10 +50,10 @@ android {
50 50  
51 51 defaultConfig {
52 52 minSdkVersion 14
53   - targetSdkVersion 27
54   - applicationId "mx.she.rd4"
55   - versionCode 6
56   - versionName "1.4"
  53 + targetSdkVersion 30
  54 + applicationId "com.summon.empires2"
  55 + versionCode 38
  56 + versionName "1.0.3"
57 57 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
58 58 signingConfig signingConfigs.release
59 59 }
... ... @@ -86,14 +86,14 @@ android {
86 86 dependencies {
87 87 implementation fileTree(include: ['*.jar'], dir: 'libs')
88 88 // implementation 'com.android.support:support-v4:27.1.1'
89   - implementation 'androidx.appcompat:appcompat:1.1.0'
90   - implementation 'androidx.fragment:fragment:1.1.0'
91   - implementation 'com.google.android.material:material:1.0.0'
  89 + implementation 'androidx.appcompat:appcompat:1.2.0'
  90 + implementation 'androidx.fragment:fragment:1.2.5'
  91 + implementation 'com.google.android.material:material:1.2.1'
92 92 testImplementation 'junit:junit:4.12'
93 93 // implementation 'com.android.support:appcompat-v7:27.1.1'
94 94 // implementation 'com.android.support:design:27.1.1'
95   -// implementation project(':GameSDK')
  95 + implementation project(':GameSDK')
96 96 // implementation project(':IAP5Helper')
97   - implementation 'com.gumptech.sdk:GameSDK:4.8.0'
  97 +// implementation 'com.gumptech.sdk:GameSDK:4.8.0'
98 98 // implementation 'com.gump.game.sdk:SamsungIAP:5.1.1'
99 99 }
GameSDKDemo/src/main/java/com/gump/game/sdk/demo/MainActivity.java
... ... @@ -30,15 +30,15 @@ public class MainActivity extends AppCompatActivity implements RechargeCallback
30 30 private Button btnPay;
31 31 private Button btnIap;
32 32  
33   - private String appId = "100";
34   - private String appKey = "f899139df5e1059396431415e770c6dd";
  33 + private String appId = "10117";
  34 + private String channelId = "1030";
35 35 private GumpUser gumpUser;
36 36  
37 37 /**
38 38 * 测试数据
39 39 */
40   - String serverId = "100";
41   - String roleId = "41080";
  40 + String serverId = "S168";
  41 + String roleId = "168000089";
42 42  
43 43  
44 44 @Override
... ... @@ -163,7 +163,7 @@ public class MainActivity extends AppCompatActivity implements RechargeCallback
163 163 /**
164 164 * 初始化sdk
165 165 */
166   - GameSDK.init(getApplicationContext(), appId);
  166 + GameSDK.init(getApplicationContext(), appId,channelId);
167 167  
168 168 tvVersion.setText("SDK Version:" + GameSDK.getVersion());
169 169  
1 1 # Gump SDK 4 for Android接入文档
2 2  
3   -V4.8.6
4   -2020年08月6日
  3 +V4.9.0
  4 +2021年06月21日
5 5  
6 6  
7 7 ## 版本概述
... ... @@ -21,7 +21,7 @@ repositories{
21 21 }
22 22 }
23 23 dependencies {
24   - implementation 'com.gumptech.sdk:GameSDK:4.8.6'
  24 + implementation 'com.gumptech.sdk:GameSDK:4.9.0'
25 25  
26 26 }
27 27 ```
... ... @@ -34,8 +34,6 @@ dependencies {
34 34 <uses-permission android:name="android.permission.INTERNET" />
35 35 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
36 36 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
37   -<!-- VERY IMPORTANT! Don't forget this permission, or in-app billing won't work. -->
38   -<uses-permission android:name="com.android.vending.BILLING" />
39 37 ```
40 38  
41 39 其次注册相应的Activity,具体如下: