Commit 2a5af05fae54d083d56df35b01f8a491a4cb95f9
1 parent
1b1227b3bf
Exists in
master
release 1.0.3
修改横竖屏切换崩溃或重复加载问题 增加支付宝页面支付配置,支持无支付宝客户端时使用页面支付 增加微信支付的条件判断,无微信不显示微信支付 增加activity configChanges配置,过滤屏幕改变引起的重加载 修改cn域名
Showing 7 changed files with 55 additions and 28 deletions Side-by-side Diff
- InlandSDKDemo/AndroidManifest.xml
- InlandSDKDemo/src/com/gump/inland/sdk/demo/MainActivity.java
- InlandSDKRelease/libs/InlandSDK_v1.0.1_proguard.jar
- InlandSDKRelease/libs/InlandSDK_v1.0.3_proguard.jar
- InlandSDKRelease/res/layout/fragment_sign_choice.xml
- InlandSDKRelease/res/values/strings.xml
- IntegrationGuide.md
InlandSDKDemo/AndroidManifest.xml
... | ... | @@ -27,10 +27,11 @@ |
27 | 27 | android:label="@string/app_name" > |
28 | 28 | <activity |
29 | 29 | android:name="com.gump.inland.sdk.demo.MainActivity" |
30 | + android:screenOrientation="landscape" | |
31 | + android:configChanges="orientation|screenSize|keyboardHidden|keyboard|screenLayout" | |
30 | 32 | android:label="@string/app_name" > |
31 | 33 | <intent-filter> |
32 | 34 | <action android:name="android.intent.action.MAIN" /> |
33 | - | |
34 | 35 | <category android:name="android.intent.category.LAUNCHER" /> |
35 | 36 | </intent-filter> |
36 | 37 | <intent-filter> |
... | ... | @@ -43,6 +44,7 @@ |
43 | 44 | </activity> |
44 | 45 | <activity |
45 | 46 | android:name="com.gump.inland.gamesdk.PassportBaseActivity" |
47 | + android:configChanges="orientation|screenSize|keyboardHidden|keyboard|screenLayout" | |
46 | 48 | android:theme="@style/Theme.TransparentWin" > |
47 | 49 | </activity> |
48 | 50 | <!-- wx callback --> |
... | ... | @@ -58,6 +60,16 @@ |
58 | 60 | android:label="@string/app_name" |
59 | 61 | android:screenOrientation="portrait" |
60 | 62 | android:windowSoftInputMode="adjustResize" /> |
63 | + <!-- alipay sdk begin --> | |
64 | + <activity | |
65 | + android:name="com.alipay.sdk.app.H5PayActivity" | |
66 | + android:configChanges="orientation|keyboardHidden|navigation" | |
67 | + android:exported="false" | |
68 | + android:screenOrientation="behind" | |
69 | + android:windowSoftInputMode="adjustResize|stateHidden" > | |
70 | + </activity> | |
71 | + | |
72 | + <!-- alipay sdk end --> | |
61 | 73 | </application> |
62 | 74 | |
63 | 75 | </manifest> |
64 | 76 | \ No newline at end of file |
InlandSDKDemo/src/com/gump/inland/sdk/demo/MainActivity.java
... | ... | @@ -38,8 +38,8 @@ public class MainActivity extends Activity { |
38 | 38 | |
39 | 39 | Log.d(TAG, "MainActivity onCreate"); |
40 | 40 | InlandSDK.setIsDebugEnable(false); |
41 | - InlandSDK.setScreenLandscape(false); | |
42 | - InlandSDK.initializeSDK("10000", "dkfjgljdlgjldjgl","1001"); | |
41 | + InlandSDK.setScreenLandscape(true); | |
42 | + InlandSDK.initializeSDK("10000", "dkfjgljdlgjldjgl"); | |
43 | 43 | Passport.getInstance().registerCallback(new InlandSDKCallback<GumpUser>() { |
44 | 44 | |
45 | 45 | @Override |
InlandSDKRelease/libs/InlandSDK_v1.0.1_proguard.jar
No preview for this file type
InlandSDKRelease/libs/InlandSDK_v1.0.3_proguard.jar
No preview for this file type
InlandSDKRelease/res/layout/fragment_sign_choice.xml
... | ... | @@ -111,7 +111,7 @@ |
111 | 111 | android:id="@+id/play" |
112 | 112 | android:layout_width="fill_parent" |
113 | 113 | android:layout_height="wrap_content" |
114 | - android:layout_marginBottom="16dp" | |
114 | + android:layout_marginBottom="0dp" | |
115 | 115 | android:layout_marginLeft="35dp" |
116 | 116 | android:layout_marginRight="35dp" |
117 | 117 | android:layout_marginTop="16dp" |
... | ... | @@ -127,6 +127,7 @@ |
127 | 127 | android:layout_height="wrap_content" |
128 | 128 | android:layout_marginLeft="35dp" |
129 | 129 | android:layout_marginRight="35dp" |
130 | + android:visibility="gone" | |
130 | 131 | android:background="@drawable/horizontal_line" /> |
131 | 132 | </LinearLayout> |
132 | 133 |
InlandSDKRelease/res/values/strings.xml
1 | -<resources> | |
1 | +<resources> | |
2 | 2 | |
3 | - <string name="user_name_hint">Email</string> | |
4 | - <string name="password_hint">Password</string> | |
5 | - <string name="switch_user">Change account</string> | |
6 | - <string name="loging">Signing...</string> | |
7 | - <string name="loading">loading</string> | |
3 | + <string name="user_name_hint">邮箱</string> | |
4 | + <string name="password_hint">密码</string> | |
5 | + <string name="switch_user">切换用户</string> | |
6 | + <string name="loging">加载中……</string> | |
7 | + <string name="loading">加载中……</string> | |
8 | 8 | |
9 | - <string name="signup">Signup</string> | |
10 | - <string name="login">Login</string> | |
11 | - <string name="quick_play">Play</string> | |
9 | + <string name="signup">注册</string> | |
10 | + <string name="login">登录</string> | |
11 | + <string name="quick_play">一键登录</string> | |
12 | 12 | <!-- toast --> |
13 | - <string name="illegal_uname_tip">Invalid Email</string> | |
14 | - <string name="illegal_pwd_tip">Invalid Password (6–20 characters).</string> | |
15 | - <string name="illegal_user_exist">Email has already used</string> | |
16 | - <string name="illegal_pwd_invalid">Password is incorrect. Please try again.</string> | |
17 | - <string name="illegal_user_not_exist">Invalid Email</string> | |
18 | - <string name="invalid_email">Invalid Email</string> | |
19 | - <string name="login_fail">Login failed</string> | |
20 | - <string name="signup_fail">Signup failed</string> | |
21 | - <string name="signup_success">Sign Up Successfully</string> | |
22 | - <string name="gen_quick_acc_err">Login failed, please try again</string> | |
23 | - <string name="quick_login_err">Login failed, please try again</string> | |
24 | - <string name="net_error">Internet unavailable, please check</string> | |
13 | + <string name="illegal_uname_tip">请输入正确的邮箱</string> | |
14 | + <string name="illegal_pwd_tip">密码格式不正确 (请输入6–20字符)</string> | |
15 | + <string name="illegal_user_exist">邮箱已注册</string> | |
16 | + <string name="illegal_pwd_invalid">密码不正确,请重试</string> | |
17 | + <string name="illegal_user_not_exist">邮箱未注册</string> | |
18 | + <string name="invalid_email">请输入正确的邮箱</string> | |
19 | + <string name="login_fail">登录失败</string> | |
20 | + <string name="signup_fail">注册失败</string> | |
21 | + <string name="signup_success">注册成功</string> | |
22 | + <string name="gen_quick_acc_err">登录失败,请重试</string> | |
23 | + <string name="quick_login_err">登录失败,请重试</string> | |
24 | + <string name="net_error">网络无法连接,请查看网络设置</string> | |
25 | 25 | |
26 | 26 | <string-array name="payment_channel"> |
27 | 27 | <item>微信支付</item> |
28 | 28 | <item>支付宝</item> |
29 | 29 | <item>银联支付</item> |
30 | 30 | </string-array> |
31 | -</resources> | |
31 | + <string-array name="payment_channel_without_wx"> | |
32 | + <item>支付宝</item> | |
33 | + <item>银联支付</item> | |
34 | + </string-array> | |
35 | +</resources> | |
32 | 36 | \ No newline at end of file |
IntegrationGuide.md
... | ... | @@ -21,6 +21,7 @@ |
21 | 21 | |
22 | 22 | <activity |
23 | 23 | android:name="com.gump.inland.gamesdk.PassportBaseActivity" |
24 | + android:configChanges="orientation|screenSize|keyboardHidden|keyboard|screenLayout" | |
24 | 25 | android:theme="@style/Theme.TransparentWin" > |
25 | 26 | </activity> |
26 | 27 | <activity |
... | ... | @@ -40,8 +41,17 @@ |
40 | 41 | android:label="@string/app_name" |
41 | 42 | android:screenOrientation="portrait" |
42 | 43 | android:windowSoftInputMode="adjustResize" /> |
44 | + <!-- alipay sdk begin --> | |
45 | + <activity | |
46 | + android:name="com.alipay.sdk.app.H5PayActivity" | |
47 | + android:configChanges="orientation|keyboardHidden|navigation" | |
48 | + android:exported="false" | |
49 | + android:screenOrientation="behind" | |
50 | + android:windowSoftInputMode="adjustResize|stateHidden" > | |
51 | + </activity> | |
52 | + <!-- alipay sdk end --> | |
43 | 53 | |
44 | -3)为入口activity增加以下Intent-filter,**data scheme配置为微信appid**: | |
54 | +3)入口activity增加**android:configChanges="orientation|screenSize|keyboardHidden|keyboard|screenLayout"**属性,并增加以下Intent-filter,**data scheme配置为微信appid**: | |
45 | 55 | |
46 | 56 | <intent-filter> |
47 | 57 | <action android:name="android.intent.action.VIEW" /> |
... | ... | @@ -51,7 +61,7 @@ |
51 | 61 | <data android:scheme="wxdb562d299ac311e0" /> |
52 | 62 | </intent-filter> |
53 | 63 | |
54 | -4.将InlandSDK工程assets目录下的文件拷贝到游戏项目的assets目录下,此处为银联支付使用 | |
64 | +4.将InlandSDKRelease工程assets目录下的文件拷贝到游戏项目的assets目录下,此处为银联支付使用 | |
55 | 65 | 5.代码接入: |
56 | 66 | 1)sdk初始化,以下方法二选一 |
57 | 67 |