Commit 969c0010c26e93e5dd4ab09eb6bed83618c6c39b

Authored by 赵康
1 parent 7a5aadf066
Exists in master

v4.1.6:修复gp支付无回调的bug

Showing 9 changed files with 26 additions and 14 deletions Side-by-side Diff

GameSDK-release4.1.5.aar
No preview for this file type
GameSDK-release4.1.6.aar
No preview for this file type
GameSDKDemo/build.gradle
... ... @@ -10,11 +10,10 @@ android {
10 10 compileSdkVersion 22
11 11 buildToolsVersion "25.0.0"
12 12  
13   -
14 13 defaultConfig {
15 14 minSdkVersion 9
16 15 targetSdkVersion 22
17   - versionCode 3
  16 + versionCode 4
18 17 versionName "1.2"
19 18 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
20 19 }
... ... @@ -35,6 +34,6 @@ dependencies {
35 34 testCompile 'junit:junit:4.12'
36 35 compile 'com.android.support:appcompat-v7:22.2.0'
37 36 // compile project(':GameSDK')
38   - compile(name:'GameSDK-release4.1.5',ext:'aar')
  37 + compile(name:'GameSDK-release4.1.6',ext:'aar')
39 38  
40 39 }
GameSDKDemo/libs/GameSDK-release4.1.5.aar
No preview for this file type
GameSDKDemo/libs/GameSDK-release4.1.6.aar
No preview for this file type
GameSDKDemo/src/main/java/com/gumptech/sdk/demo/MainActivity.java
... ... @@ -31,7 +31,7 @@ public class MainActivity extends Activity implements PurchaseCallback {
31 31 private Button btnLoginOrLogout;
32 32  
33 33 private String appId = "10022";
34   - private String appKey = "93a27b0bd99bac3e68a440b48aa421ab";
  34 + private String appKey = "c1aff6753244c6ee93d489992b51f012";
35 35 private String sessionKey;
36 36  
37 37  
... ... @@ -39,6 +39,7 @@ public class MainActivity extends Activity implements PurchaseCallback {
39 39 protected void onCreate(Bundle savedInstanceState) {
40 40 super.onCreate(savedInstanceState);
41 41 setContentView(R.layout.activity_main);
  42 +
42 43 tvVersion = (TextView) findViewById(R.id.version);
43 44 userInfo = (TextView) findViewById(R.id.user_info);
44 45 btnLoginOrLogout = (Button) findViewById(R.id.login_or_logout);
... ... @@ -70,7 +71,7 @@ public class MainActivity extends Activity implements PurchaseCallback {
70 71 @Override
71 72 public void onClick(View v) {
72 73 Bundle payInfo = new Bundle();
73   - payInfo.putString("product", "gp_skuId");
  74 + payInfo.putString("product", "180010");
74 75 payInfo.putFloat("amount", 0.1f);
75 76 payInfo.putString("extraInfo", "This is demo!");
76 77 payInfo.putString("serverId", "100");
GameSDKDemo/src/main/res/layout/activity_main.xml
1 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2   - android:layout_width="match_parent"
3   - android:layout_height="match_parent"
4   - android:background="@android:color/white"
5   - android:orientation="vertical">
  2 + android:layout_width="match_parent"
  3 + android:layout_height="match_parent"
  4 + android:background="@android:color/white"
  5 + android:fitsSystemWindows="true"
  6 + android:orientation="vertical">
6 7  
7 8 <TextView
8 9 android:id="@+id/version"
9 10 android:layout_width="wrap_content"
10 11 android:layout_height="wrap_content"
11 12 android:layout_gravity="center_horizontal"
12   - android:textColor="@color/black_text" />
  13 + android:textColor="@color/black_text"/>
13 14  
14 15 <TextView
15 16 android:id="@+id/user_info"
16 17 android:layout_width="match_parent"
17 18 android:layout_height="wrap_content"
18   - android:textColor="@android:color/black" />
  19 + android:textColor="@android:color/black"/>
19 20  
20 21 <Button
21 22 android:id="@+id/login_or_logout"
... ... @@ -23,7 +24,8 @@
23 24 android:layout_height="wrap_content"
24 25 android:backgroundTint="@color/g_color"
25 26 android:enabled="false"
26   - android:text="Login" />
  27 + android:text="Login"/>
  28 +
27 29 <Button
28 30 android:id="@+id/iap"
29 31 android:layout_width="match_parent"
... ... @@ -36,6 +38,6 @@
36 38 android:layout_width="match_parent"
37 39 android:layout_height="wrap_content"
38 40 android:backgroundTint="@color/g_color"
39   - android:text="pay" />
  41 + android:text="pay"/>
40 42  
41 43 </LinearLayout>
42 44 \ No newline at end of file
GameSDKDemo/src/main/res/values-v19/styles.xml
... ... @@ -0,0 +1,6 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <style name="AppTheme" parent="BaseAppTheme">
  4 + <item name="android:windowTranslucentStatus">true</item>
  5 + </style>
  6 +</resources>
0 7 \ No newline at end of file
GameSDKDemo/src/main/res/values/styles.xml
1 1 <resources>
2 2  
3 3 <!-- Base application theme. -->
4   - <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
  4 + <style name="BaseAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5 5 <!-- Customize your theme here. -->
6 6 <item name="colorPrimary">@color/colorPrimary</item>
7 7 <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8 8 <item name="colorAccent">@color/colorAccent</item>
9 9 </style>
10 10  
  11 + <style name="AppTheme" parent="BaseAppTheme">
  12 +
  13 + </style>
  14 +
11 15 </resources>