Commit 359f62c6df82bb45c94e2e3c21fea907574a3c10

Authored by 赵康
1 parent 01a202f853
Exists in master

v3.1.0

增加bluePay支付
支持cp指定界面横竖屏

Showing 25 changed files with 420 additions and 91 deletions Inline Diff

android/GameSDKRelease/libs/BluePay_2_4.jar
No preview for this file type
android/GameSDKRelease/libs/GameSDK_v3.0.1_proguard.jar
No preview for this file type
android/GameSDKRelease/libs/GameSDK_v3.1.0_proguard.jar
No preview for this file type
android/GameSDKRelease/res/drawable-hdpi/bluep_btnbg.9.png

258 Bytes

android/GameSDKRelease/res/drawable-hdpi/bluep_btnbg_hl.9.png

269 Bytes

android/GameSDKRelease/res/drawable-hdpi/bluep_btnbg_selector.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector
3 xmlns:android="http://schemas.android.com/apk/res/android">
4 <item android:state_focused="true" android:drawable="@drawable/bluep_btnbg" />
5 <item android:state_pressed="true" android:drawable="@drawable/bluep_btnbg_hl" />
6 <item android:state_pressed="false" android:drawable="@drawable/bluep_btnbg" />
7 </selector>
8
android/GameSDKRelease/res/drawable-hdpi/bluep_icon_one_calltip.jpg

44.6 KB

android/GameSDKRelease/res/drawable-hdpi/bluep_icon_true_tip.jpg

57.4 KB

android/GameSDKRelease/res/drawable-hdpi/bluep_input_bg.png

380 Bytes

android/GameSDKRelease/res/drawable-hdpi/bluep_logo_onetwocall.jpg

7.31 KB

android/GameSDKRelease/res/drawable-hdpi/bluep_logo_truemoney.png

4.96 KB

android/GameSDKRelease/res/drawable-hdpi/bluep_payarrow.jpg

11.5 KB

android/GameSDKRelease/res/drawable-hdpi/bluep_paylist_arrow_high.png

715 Bytes

android/GameSDKRelease/res/drawable-hdpi/bluep_paylist_arrow_normal.png

672 Bytes

android/GameSDKRelease/res/drawable-hdpi/bluep_paylist_arrow_selector.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <selector
3 xmlns:android="http://schemas.android.com/apk/res/android">
4 <item android:state_focused="true" android:drawable="@drawable/bluep_paylist_arrow_normal" />
5 <item android:state_pressed="true" android:drawable="@drawable/bluep_paylist_arrow_high" />
6 <item android:state_pressed="false" android:drawable="@drawable/bluep_paylist_arrow_normal" />
7 </selector>
8
android/GameSDKRelease/res/drawable-hdpi/bluep_paylist_bg.9.png

319 Bytes

android/GameSDKRelease/res/drawable-hdpi/bluepay_logo.png

13.4 KB

android/GameSDKRelease/res/layout/bluep_by_otc_landscape.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3 android:id="@+id/scrollView1"
4 android:layout_width="350sp"
5 android:layout_height="wrap_content"
6 android:background="#ffffffff" >
7
8 <LinearLayout
9 android:layout_width="fill_parent"
10 android:layout_height="380sp"
11 android:gravity="center"
12 android:id="@+id/payByPortrait"
13 android:orientation="vertical" >
14
15 <RelativeLayout
16 android:layout_width="fill_parent"
17 android:layout_height="50sp" >
18
19 <ImageView
20 android:id="@+id/headerLogo"
21 android:layout_width="200sp"
22 android:layout_height="wrap_content"
23 android:layout_alignParentLeft ="true"
24 android:layout_marginLeft="5sp"
25 android:layout_marginTop="5sp"
26 android:layout_centerVertical="true"
27 android:background="@drawable/bluepay_logo" />
28
29 </RelativeLayout>
30
31 <RelativeLayout
32 android:layout_width="wrap_content"
33 android:layout_weight="0.6"
34 android:paddingTop="5sp"
35 android:layout_height="wrap_content">
36
37
38 <ImageView
39 android:id="@+id/tipIv"
40 android:layout_width="200sp"
41 android:layout_height="100sp"
42 android:layout_centerHorizontal="true"
43 android:src="@drawable/bluep_logo_onetwocall"/>
44
45 <LinearLayout
46 android:layout_width="wrap_content"
47 android:layout_height="wrap_content"
48 android:layout_below="@id/tipIv"
49 android:layout_centerHorizontal="true"
50 android:layout_marginTop="5sp"
51 android:orientation="vertical" >
52
53 <TextView
54 android:id="@+id/textView1"
55 android:layout_width="fill_parent"
56 android:layout_height="wrap_content"
57 android:gravity="center_horizontal"
58 android:singleLine="true"
59 android:text="Please Input your Card No."
60 android:textSize="20px"
61 android:visibility="gone" />
62
63 <EditText
64 android:id="@+id/payEdit"
65 android:layout_width="240sp"
66 android:layout_height="wrap_content"
67 android:layout_gravity="center"
68 android:layout_weight="1"
69 android:background="@drawable/bluep_input_bg"
70 android:ems="10"
71 android:gravity="left"
72 android:hint="Please Input your Card No."
73 android:inputType="number"
74 android:numeric="integer"
75 android:focusableInTouchMode="true"
76 android:padding="10sp"
77 android:textColor="#ff000000"
78 android:textSize="18sp" >
79
80 </EditText>
81
82 <TextView
83 android:id="@+id/payTip"
84 android:layout_width="wrap_content"
85 android:layout_height="wrap_content"
86 android:singleLine="true"
87 android:text=""
88 android:textColor="#ffff0000"
89 android:textSize="14px"
90 android:layout_weight="0.4"
91 android:visibility="gone" />
92 </LinearLayout>
93
94 </RelativeLayout>
95
96 <RelativeLayout
97 android:layout_width="match_parent"
98 android:layout_marginTop="5sp"
99 android:layout_weight="0.6"
100 android:layout_height="40sp" >
101
102 <Button android:id="@+id/paybyYes"
103 android:layout_width="wrap_content"
104 android:layout_height="wrap_content"
105 android:layout_marginLeft="65sp"
106 android:layout_alignParentLeft="true"
107 android:layout_centerVertical="true"
108 android:text="Ok"
109 android:textColor="#ffffffff"
110 android:background="@drawable/bluep_btnbg_selector" />
111
112 <Button
113 android:id="@+id/paybyNo"
114 android:layout_width="wrap_content"
115 android:layout_height="wrap_content"
116 android:layout_marginRight="65sp"
117 android:layout_alignParentRight="true"
118 android:layout_centerVertical="true"
119 android:text="Cancel"
120 android:textColor="#ffffffff"
121 android:background="@drawable/bluep_btnbg_selector" />
122
123 <!-- <ImageButton
124 android:id="@+id/paybyYes"
125 android:layout_width="wrap_content"
126 android:layout_height="wrap_content"
127 android:paddingLeft="5sp"
128 android:layout_alignParentLeft="true"
129 android:layout_centerVertical="true"
130 android:src="@drawable/g_yes_selector"
131 android:background="@null" />
132
133 <ImageButton
134 android:id="@+id/paybyNo"
135 android:layout_width="wrap_content"
136 android:layout_height="wrap_content"
137 android:paddingRight="5sp"
138 android:layout_alignParentRight="true"
139 android:layout_centerVertical="true"
140 android:src="@drawable/g_no_selector"
141 android:background="@null" /> -->
142
143
144 </RelativeLayout>
145
146 </LinearLayout>
147
148 </ScrollView>
android/GameSDKRelease/res/layout/bluep_by_otc_portrait.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3 android:id="@+id/scrollView1"
4 android:layout_width="300sp"
5 android:layout_height="wrap_content"
6 android:background="#ffffffff" >
7
8 <LinearLayout
9 android:layout_width="fill_parent"
10 android:layout_height="400sp"
11 android:gravity="center"
12 android:id="@+id/payByPortrait"
13 android:orientation="vertical" >
14
15 <RelativeLayout
16 android:layout_width="fill_parent"
17 android:layout_height="50sp" >
18
19 <ImageView
20 android:id="@+id/headerLogo"
21 android:layout_width="200sp"
22 android:layout_height="wrap_content"
23 android:layout_centerVertical="true"
24 android:layout_alignParentLeft="true"
25 android:layout_marginLeft="5sp"
26 android:layout_marginTop="5sp"
27 android:background="@drawable/bluepay_logo" />
28
29 </RelativeLayout>
30
31 <RelativeLayout
32 android:layout_width="wrap_content"
33 android:layout_weight="0.6"
34 android:paddingTop="5sp"
35 android:layout_height="wrap_content">
36
37
38 <ImageView
39 android:id="@+id/tipIv"
40 android:layout_width="200sp"
41 android:layout_height="100sp"
42 android:layout_centerHorizontal="true"
43 android:src="@drawable/bluep_logo_onetwocall"/>
44
45 <LinearLayout
46 android:layout_width="wrap_content"
47 android:layout_height="wrap_content"
48 android:layout_below="@id/tipIv"
49 android:layout_centerHorizontal="true"
50 android:layout_marginTop="5sp"
51 android:orientation="vertical" >
52
53 <TextView
54 android:id="@+id/textView1"
55 android:layout_width="fill_parent"
56 android:layout_height="wrap_content"
57 android:gravity="center_horizontal"
58 android:singleLine="true"
59 android:text="Please Input your Card No."
60 android:textSize="20px"
61 android:visibility="gone" />
62
63 <EditText
64 android:id="@+id/payEdit"
65 android:layout_width="240sp"
66 android:layout_height="wrap_content"
67 android:layout_gravity="center"
68 android:layout_weight="1"
69 android:background="@drawable/bluep_input_bg"
70 android:ems="10"
71 android:gravity="left"
72 android:hint="Please Input your Card No."
73 android:inputType="number"
74 android:numeric="integer"
75 android:focusableInTouchMode="true"
76 android:padding="10sp"
77 android:textColor="#ff000000"
78 android:textSize="18sp" >
79
80 </EditText>
81
82 <TextView
83 android:id="@+id/payTip"
84 android:layout_width="wrap_content"
85 android:layout_height="wrap_content"
86 android:singleLine="true"
87 android:text=""
88 android:textColor="#ffff0000"
89 android:textSize="14px"
90 android:layout_weight="0.4"
91 android:visibility="gone" />
92 </LinearLayout>
93
94 </RelativeLayout>
95
96 <RelativeLayout
97 android:layout_width="match_parent"
98 android:layout_marginTop="5sp"
99 android:layout_weight="0.6"
100 android:layout_height="40sp" >
101
102
103 <Button android:id="@+id/paybyYes"
104 android:layout_width="wrap_content"
105 android:layout_height="wrap_content"
106 android:layout_marginLeft="30sp"
107 android:layout_alignParentLeft="true"
108 android:layout_centerVertical="true"
109 android:text="Ok"
110 android:textColor="#ffffffff"
111 android:background="@drawable/bluep_btnbg_selector" />
112
113 <Button
114 android:id="@+id/paybyNo"
115 android:layout_width="wrap_content"
116 android:layout_height="wrap_content"
117 android:layout_marginRight="30sp"
118 android:layout_alignParentRight="true"
119 android:layout_centerVertical="true"
120 android:text="Cancel"
121 android:textColor="#ffffffff"
122 android:background="@drawable/bluep_btnbg_selector" />
123
124 <!-- <ImageButton
125 android:id="@+id/paybyYes"
126 android:layout_width="wrap_content"
127 android:layout_height="wrap_content"
128 android:paddingLeft="5sp"
129 android:layout_alignParentLeft="true"
130 android:layout_centerVertical="true"
131 android:src="@drawable/g_yes_selector"
132 android:background="@drawable/g_btnbg_selector" />
133
134 <ImageButton
135 android:id="@+id/paybyNo"
136 android:layout_width="wrap_content"
137 android:layout_height="wrap_content"
138 android:paddingRight="5sp"
139 android:layout_alignParentRight="true"
140 android:layout_centerVertical="true"
141 android:src="@drawable/g_no_selector"
142 android:background="@null" /> -->
143
144
145 </RelativeLayout>
146
147 </LinearLayout>
148
149 </ScrollView>
android/GameSDKRelease/res/layout/bluep_smslist.xml
File was created 1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:id="@+id/scrollView1"
4 android:layout_width="300sp"
5 android:layout_height="220sp"
6 android:background="#ffffffff"
7 android:gravity="center"
8 android:orientation="vertical" >
9
10 <ImageView
11 android:layout_width="200sp"
12 android:layout_height="50sp"
13 android:layout_marginTop="5sp"
14 android:background="@drawable/bluepay_logo" />
15
16 <TextView android:id="@+id/Bluep_payTip"
17 android:layout_width="250sp"
18 android:layout_height="40sp"
19 android:paddingRight="5sp"
20 android:layout_marginTop="5sp"
21 android:textColor="#ff000000"
22 android:textSize="14sp"
23 android:gravity="center"/>
24
25 <Button android:id="@+id/Bluep_payList"
26 android:layout_width="250sp"
27 android:layout_height="40sp"
28 android:paddingRight="5sp"
29 android:layout_marginTop="5sp"
30 android:textColor="#ff000000"
31 android:textSize="16sp"
32 android:gravity="center"
33 android:background="@drawable/bluep_paylist_bg"
34 android:drawableRight="@drawable/bluep_paylist_arrow_selector"/>
35
36 <RelativeLayout
37 android:layout_width="fill_parent"
38 android:layout_height="wrap_content"
39 android:layout_marginTop="15sp"
40 android:layout_marginBottom="5sp" >
41
42
43 <Button android:id="@+id/Bluep_paybyYes"
44 android:layout_width="wrap_content"
45 android:layout_height="wrap_content"
46 android:layout_marginLeft="30sp"
47 android:layout_alignParentLeft="true"
48 android:layout_centerVertical="true"
49
50 android:text="Ok"
51 android:textColor="#ffffffff"
52 android:background="@drawable/bluep_btnbg_selector" />
53
54 <Button
55 android:id="@+id/Bluep_paybyNo"
56 android:layout_width="wrap_content"
57 android:layout_height="wrap_content"
58 android:layout_marginRight="30sp"
59 android:layout_alignParentRight="true"
60 android:layout_centerVertical="true"
61 android:text="Cancel"
62 android:textColor="#ffffffff"
63 android:background="@drawable/bluep_btnbg_selector" />
64
65 </RelativeLayout>
66
67 </LinearLayout>
android/GameSDKRelease/res/values/dimens.xml
File was created 1 <resources>
2
3 <!-- Default screen margins, per the Android Design guidelines. -->
4 <dimen name="activity_horizontal_margin">16dp</dimen>
5 <dimen name="activity_vertical_margin">16dp</dimen>
6
7 </resources>
android/GameSDKRelease/res/values/strings.xml
1 <resources> 1 <resources>
2 2
3 <string name="user_name_hint">Email</string> 3 <string name="user_name_hint">Email</string>
4 <string name="password_hint">Password</string> 4 <string name="password_hint">Password</string>
5 <string name="quick_login">Play(%sS)</string> 5 <string name="quick_login">Play(%sS)</string>
6 <string name="quick_play">Play</string> 6 <string name="quick_play">Play</string>
7 <string name="login">Login</string> 7 <string name="login">Login</string>
8 <string name="signup">Signup</string> 8 <string name="signup">Signup</string>
9 <string name="bind">Bound to email</string> 9 <string name="bind">Bound to email</string>
10 <string name="loading">Loading</string> 10 <string name="loading">Loading</string>
11
12 <!-- toast --> 11 <!-- toast -->
13 <string name="illegal_uname_tip">Invalid Email</string> 12 <string name="illegal_uname_tip">Invalid Email</string>
14 <string name="illegal_pwd_tip">Invalid Password (6–20 characters).</string> 13 <string name="illegal_pwd_tip">Invalid Password (6–20 characters).</string>
15 <string name="illegal_user_exist">Email has already used</string> 14 <string name="illegal_user_exist">Email has already used</string>
16 <string name="illegal_pwd_invalid">Password is incorrect. Please try again.</string> 15 <string name="illegal_pwd_invalid">Password is incorrect. Please try again.</string>
17 <string name="illegal_user_not_exist">Invalid Email</string> 16 <string name="illegal_user_not_exist">Invalid Email</string>
18 <string name="invalid_email">Invalid Email</string> 17 <string name="invalid_email">Invalid Email</string>
19 <string name="login_fail">Login failed</string> 18 <string name="login_fail">Login failed</string>
20 <string name="signup_fail">Signup failed</string> 19 <string name="signup_fail">Signup failed</string>
21 <string name="bind_fail">Bound failed</string> 20 <string name="bind_fail">Bound failed</string>
22 <string name="net_error">Internet unavailable, please check</string> 21 <string name="net_error">Internet unavailable, please check</string>
23 <string name="gump_login">Login with Gumptech</string> 22 <string name="gump_login">Login with Gumptech</string>
24 <string name="fb_login">Login with Facebook</string> 23 <string name="fb_login">Login with Facebook</string>
25 <string name="signup_success">Sign Up Successfully</string> 24 <string name="signup_success">Sign Up Successfully</string>
26 <!-- facebook --> 25 <!-- facebook -->
27 26
28 27
29 <!-- 支付相关 --> 28 <!-- 支付相关 -->
29
30
30 <!-- title --> 31 <!-- title -->
31 <string name="title_mycard">Mycard點數儲值</string> 32 <string name="title_mycard">Mycard點數儲值</string>
32 <string name="title_mycard_member">Mycard會員扣點</string> 33 <string name="title_mycard_member">Mycard會員扣點</string>
33 <string name="title_mycard_billing">Mycard Billing</string> 34 <string name="title_mycard_billing">Mycard Billing</string>
34 <string name="title_mol">MOLPoints Gift Card</string> 35 <string name="title_mol">MOLPoints Gift Card</string>
35 <string name="title_mol_wallet">MOLPoints E-Wallet</string> 36 <string name="title_mol_wallet">MOLPoints E-Wallet</string>
36 <string name="title_12call">12Call</string> 37 <string name="title_12call">12Call</string>
37 <string name="title_tm">True Money</string> 38 <string name="title_tm">True Money</string>
38 <string name="title_zest">Zest</string> 39 <string name="title_zest">Zest</string>
39 <string name="title_gp">Google play</string> 40 <string name="title_gp">Google play</string>
40 <string name="title_paypal">Paypal</string> 41 <string name="title_paypal">Paypal</string>
41 <string name="title_rixty">Rixty</string> 42 <string name="title_rixty">Rixty</string>
42 <string name="title_ngan">NganLoung</string> 43 <string name="title_ngan">NganLoung</string>
43 <string name="title_easy2pay">Easy2Pay</string> 44 <string name="title_easy2pay">Easy2Pay</string>
44 <string name="title_boa">BOACompra</string> 45 <string name="title_boa">BOACompra</string>
45 <string name="title_indomog_voucher">Indomog</string> 46 <string name="title_indomog_voucher">Indomog</string>
46 <string name="title_indomog_account">Indomog Account Balance</string> 47 <string name="title_indomog_account">Indomog Account Balance</string>
47 <string name="title_yandex">Yandex</string> 48 <string name="title_yandex">Yandex</string>
48 <string name="title_vnpt_vnp">VinaPhone</string> 49 <string name="title_vnpt_vnp">VinaPhone</string>
49 <string name="title_vnpt_vms">MobiFone</string> 50 <string name="title_vnpt_vms">MobiFone</string>
50 <string name="title_vnpt_onc">Oncash</string> 51 <string name="title_vnpt_onc">Oncash</string>
51 <string name="title_vnpt_fpt">FPT</string> 52 <string name="title_vnpt_fpt">FPT</string>
52 <string name="title_vnpt_vtt">Viettel</string> 53 <string name="title_vnpt_vtt">Viettel</string>
53 <string name="title_vnpt_mgc">MegaCard</string> 54 <string name="title_vnpt_mgc">MegaCard</string>
54 <string name="title_coda">Coda Payment</string> 55 <string name="title_coda">Coda Payment</string>
55 <string name="title_cherry">Cherry Credits</string> 56 <string name="title_cherry">Cherry Credits</string>
56 <string name="title_payment_choice">Select payment methods</string> 57 <string name="title_payment_choice">Select payment methods</string>
58
57 <!-- summary title --> 59 <!-- summary title -->
58 <string name="summary_title">Price list:</string> 60 <string name="summary_title">Price list:</string>
59 61
60 <!-- payment --> 62 <!-- payment -->
61 <string name="useranme_pattern">Account:%s</string> 63 <string name="useranme_pattern">Account:%s</string>
62 <string name="mol_card_hint">Card No.</string> 64 <string name="mol_card_hint">Card No.</string>
63 <string name="mol_pass_hint">Password</string> 65 <string name="mol_pass_hint">Password</string>
64 <string name="pay_ok">OK</string> 66 <string name="pay_ok">OK</string>
65 <string name="pay_error">Charging Failed, please try again.</string> 67 <string name="pay_error">Charging Failed, please try again.</string>
66 <string name="card_input_tip">Card information</string> 68 <string name="card_input_tip">Card information</string>
67 <string name="amount_choice_tip">Please select the amount</string> 69 <string name="amount_choice_tip">Please select the amount</string>
68 70
69 <!-- paypal --> 71 <!-- paypal -->
70 <string name="paypal_amount_hint">Please enter the payment amount (Integer between %s to 10000)</string> 72 <string name="paypal_amount_hint">Please enter the payment amount (Integer between %s to 10000)</string>
71 <string name="paypal_choice_tip">Please select the amount</string> 73 <string name="paypal_choice_tip">Please select the amount</string>
72 <!-- gp --> 74 <!-- gp -->
73 <string name="gp_choice_tip">Please select the amount</string> 75 <string name="gp_choice_tip">Please select the amount</string>
74 <!-- yandex --> 76 <!-- yandex -->
75 <string name="yandex_money">Yandex Money</string> 77 <string name="yandex_money">Yandex Money</string>
76 <string name="yandex_bank">Yandex Bank</string> 78 <string name="yandex_bank">Yandex Bank</string>
77 <string name="yandex_cash">Yandex Cash</string> 79 <string name="yandex_cash">Yandex Cash</string>
78 80
android/GameSDKRelease/res/values/styles.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <resources>
2 <!--
3 Copyright 2010-present Facebook.
4 2
5 Licensed under the Apache License, Version 2.0 (the "License"); 3 <!--
6 you may not use this file except in compliance with the License. 4 Base application theme, dependent on API level. This theme is replaced
7 You may obtain a copy of the License at 5 by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
8 6 -->
9 http://www.apache.org/licenses/LICENSE-2.0 7 <style name="AppBaseTheme" parent="android:Theme.Light">
10 8 <!--
11 Unless required by applicable law or agreed to in writing, software 9 Theme customizations available in newer API levels can go in
12 distributed under the License is distributed on an "AS IS" BASIS, 10 res/values-vXX/styles.xml, while customizations related to
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 backward-compatibility can go here.
14 See the License for the specific language governing permissions and 12 -->
15 limitations under the License. 13 </style>
16 -->
17
18 <resources xmlns:android="http://schemas.android.com/apk/res/android">
19 14
15 <!-- Application theme. -->
16 <style name="AppTheme" parent="AppBaseTheme">
17 <!-- All customizations that are NOT specific to a particular API-level can go here. -->
18 </style>
20 19
21 <style name="NotificationText"> 20 <style name="NotificationText">
22 <item name="android:textColor">?android:attr/textColorPrimary</item> 21 <item name="android:textColor">?android:attr/textColorPrimary</item>
23 </style> 22 </style>
24 23
25 <style name="NotificationTitle"> 24 <style name="NotificationTitle">
26 <item name="android:textColor">?android:attr/textColorPrimary</item> 25 <item name="android:textColor">?android:attr/textColorPrimary</item>
android/GameSDKSample/AndroidManifest.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <manifest xmlns:android="http://schemas.android.com/apk/res/android" 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.loginsdk.sample" 3 package="com.loginsdk.sample"
4 android:versionCode="6" 4 android:versionCode="6"
5 android:versionName="1.6" > 5 android:versionName="1.6" >
6 6
7 <uses-sdk 7 <uses-sdk
8 android:minSdkVersion="8" 8 android:minSdkVersion="8"
9 android:targetSdkVersion="8" /> 9 android:targetSdkVersion="8" />
10 10
11 <uses-permission android:name="android.permission.INTERNET" /> 11 <uses-permission android:name="android.permission.INTERNET" />
12 <uses-permission android:name="android.permission.READ_PHONE_STATE" /> 12 <uses-permission android:name="android.permission.READ_PHONE_STATE" />
13 <uses-permission android:name="android.permission.BLUETOOTH" /> 13 <uses-permission android:name="android.permission.BLUETOOTH" />
14 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 14 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
15 <uses-permission android:name="android.permission.WRITE_SETTINGS" /> 15 <uses-permission android:name="android.permission.WRITE_SETTINGS" />
16 <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 16 <uses-permission android:name="android.permission.GET_ACCOUNTS" />
17 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 17 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
18 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 18 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
19 <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> 19 <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
20 <!-- upay --> 20 <!-- upay -->
21 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 21 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
22 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 22 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
23 <uses-permission android:name="android.permission.VIBRATE" /> 23 <uses-permission android:name="android.permission.VIBRATE" />
24 <uses-permission android:name="android.permission.SEND_SMS" /> 24 <uses-permission android:name="android.permission.SEND_SMS" />
25 <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> 25 <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
26 <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> 26 <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
27 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 27 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
28 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 28 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
29 <!-- for card.io card scanning --> 29 <!-- for card.io card scanning -->
30 <uses-permission android:name="android.permission.CAMERA" /> 30 <uses-permission android:name="android.permission.CAMERA" />
31 <uses-permission android:name="android.permission.VIBRATE" />
32 <uses-permission android:name="android.permission.SEND_SMS" />
33 <!-- coda --> 31 <!-- coda -->
34 <uses-permission android:name="android.permission.RECEIVE_SMS" /> 32 <uses-permission android:name="android.permission.RECEIVE_SMS" />
35 <uses-permission android:name="android.permission.READ_SMS" /> 33 <uses-permission android:name="android.permission.READ_SMS" />
36 <uses-permission android:name="android.permission.WRITE_SMS" /> 34 <uses-permission android:name="android.permission.WRITE_SMS" />
37 <uses-permission android:name="android.permission.GET_TASKS" /> 35 <uses-permission android:name="android.permission.GET_TASKS" />
38 36
39 <uses-feature
40 android:name="android.hardware.camera"
41 android:required="false" />
42 <uses-feature
43 android:name="android.hardware.camera.autofocus"
44 android:required="false" />
45 <!-- VERY IMPORTANT! Don't forget this permission, or in-app billing won't work. --> 37 <!-- VERY IMPORTANT! Don't forget this permission, or in-app billing won't work. -->
46 <uses-permission android:name="com.android.vending.BILLING" /> 38 <uses-permission android:name="com.android.vending.BILLING" />
47 39
48 <application 40 <application
49 android:allowBackup="true" 41 android:allowBackup="true"
50 android:icon="@drawable/ic_launcher" 42 android:icon="@drawable/ic_launcher"
51 android:label="@string/app_name" > 43 android:label="@string/app_name" >
52 <activity 44 <activity
53 android:name="com.gumptech.loginsdk.sample.MainActivity" 45 android:name="com.gumptech.loginsdk.sample.MainActivity"
54 android:configChanges="navigation|orientation|keyboard" 46 android:configChanges="navigation|orientation|keyboard"
55 android:label="@string/app_name" 47 android:label="@string/app_name"
56 android:screenOrientation="portrait" > 48 android:screenOrientation="portrait" >
57 <intent-filter> 49 <intent-filter>
58 <action android:name="android.intent.action.MAIN" /> 50 <action android:name="android.intent.action.MAIN" />
59 51
60 <category android:name="android.intent.category.LAUNCHER" /> 52 <category android:name="android.intent.category.LAUNCHER" />
61 </intent-filter> 53 </intent-filter>
62 </activity> 54 </activity>
63 <activity 55 <activity
64 android:name="com.gumptech.sdk.ContainerActivity" 56 android:name="com.gumptech.sdk.ContainerActivity"
65 android:configChanges="orientation|screenLayout" 57 android:configChanges="orientation|screenLayout"
66 android:screenOrientation="portrait"
67 android:theme="@style/container_dialog" > 58 android:theme="@style/container_dialog" >
68 </activity> 59 </activity>
69 <activity 60 <activity
70 android:name="com.facebook.LoginActivity"
71 android:theme="@android:style/Theme.Translucent.NoTitleBar" >
72 </activity>
73 <activity
74 android:name="com.gumptech.sdk.PaymentActivity" 61 android:name="com.gumptech.sdk.PaymentActivity"
75 android:configChanges="orientation|screenLayout" 62 android:configChanges="orientation|screenLayout"
76 android:theme="@android:style/Theme.Translucent.NoTitleBar" > 63 android:theme="@android:style/Theme.Translucent.NoTitleBar" >
77 </activity> 64 </activity>
78 <activity 65 <activity
79 android:name="com.gumptech.sdk.ExchangeWindow" 66 android:name="com.gumptech.sdk.ExchangeWindow"
80 android:configChanges="orientation|screenLayout" 67 android:configChanges="orientation|screenLayout"
81 android:theme="@style/ex_win" > 68 android:theme="@style/ex_win" >
82 </activity> 69 </activity>
83 70
84 <service android:name="com.gumptech.sdk.PushService" > 71 <service android:name="com.gumptech.sdk.PushService" >
85 </service> 72 </service>
86 <!-- paypal -->
87 <service
88 android:name="com.paypal.android.sdk.payments.PayPalService"
89 android:exported="false" />
90
91 <activity android:name="com.paypal.android.sdk.payments.PaymentActivity" />
92 <activity android:name="com.paypal.android.sdk.payments.LoginActivity" />
93 <activity android:name="com.paypal.android.sdk.payments.PaymentMethodActivity" />
94 <activity android:name="com.paypal.android.sdk.payments.PaymentConfirmActivity" />
95 <activity android:name="com.paypal.android.sdk.payments.PayPalFuturePaymentActivity" />
96 <activity android:name="com.paypal.android.sdk.payments.FuturePaymentConsentActivity" />
97 <activity android:name="com.paypal.android.sdk.payments.FuturePaymentInfoActivity" />
98 <activity
99 android:name="io.card.payment.CardIOActivity"
100 android:configChanges="keyboardHidden|orientation" />
101 <activity android:name="io.card.payment.DataEntryActivity" />
102 <activity
103 android:name="com.android.easy2pay.Easy2PayScreen"
104 android:theme="@android:style/Theme.Translucent.NoTitleBar" />
105 <activity
106 android:name="com.codapayments.sdk.pay.CodaWeb"
107 android:alwaysRetainTaskState="true"
108 android:configChanges="orientation|screenSize"
109 android:screenOrientation="unspecified" >
110 </activity>
111
112 <receiver
113 android:name="com.codapayments.sdk.message.PendingTxnReceiver"
114 android:enabled="true" >
115 </receiver>
116
117 <!-- upay -->
118 <activity
119 android:name="com.upay.billing.UpayActivity"
120 android:configChanges="orientation|keyboardHidden|screenSize"
121 android:theme="@android:style/Theme.Translucent" />
122 <activity
123 android:name="com.upay.billing.engine.ais.AisActivity"
124 android:configChanges="orientation|keyboardHidden|screenSize"
125 android:theme="@android:style/Theme.Translucent" />
126
127 <service android:name="com.upay.billing.sdk.LocalService" >
128 <intent-filter>
129 <action android:name="com.gumptech.loginsdk.sample.LocalService" />
130 </intent-filter>
131 </service>
132 </application> 73 </application>
133 74
134 </manifest> 75 </manifest>
android/GameSDKSample/src/com/gumptech/loginsdk/sample/MainActivity.java
1 package com.gumptech.loginsdk.sample; 1 package com.gumptech.loginsdk.sample;
2 2
3 import android.app.Activity; 3 import android.app.Activity;
4 import android.content.Intent; 4 import android.content.Intent;
5 import android.os.Bundle; 5 import android.os.Bundle;
6 import android.util.Log; 6 import android.util.Log;
7 import android.view.View; 7 import android.view.View;
8 import android.widget.Button; 8 import android.widget.Button;
9 import android.widget.TextView; 9 import android.widget.TextView;
10 import android.widget.Toast; 10 import android.widget.Toast;
11 11
12 import com.gumptech.sdk.GumpSDK; 12 import com.gumptech.sdk.GumpSDK;
13 import com.loginsdk.sample.R; 13 import com.loginsdk.sample.R;
14 14
15 public class MainActivity extends Activity implements GumpSDK.Callback { 15 public class MainActivity extends Activity implements GumpSDK.Callback {
16 16
17 private TextView tvVersion; 17 private TextView tvVersion;
18 private TextView userInfo; 18 private TextView userInfo;
19 19
20 private Button btnLoginOrLogout; 20 private Button btnLoginOrLogout;
21 21
22 private String appId = "10022"; 22 private String appId = "10022";
23 23
24 @Override 24 @Override
25 protected void onCreate(Bundle savedInstanceState) { 25 protected void onCreate(Bundle savedInstanceState) {
26 super.onCreate(savedInstanceState); 26 super.onCreate(savedInstanceState);
27 setContentView(R.layout.activity_main); 27 setContentView(R.layout.activity_main);
28 tvVersion = (TextView) findViewById(R.id.version); 28 tvVersion = (TextView) findViewById(R.id.version);
29 userInfo = (TextView) findViewById(R.id.user_info); 29 userInfo = (TextView) findViewById(R.id.user_info);
30 btnLoginOrLogout = (Button) findViewById(R.id.login_or_logout); 30 btnLoginOrLogout = (Button) findViewById(R.id.login_or_logout);
31 btnLoginOrLogout.setOnClickListener(new View.OnClickListener() { 31 btnLoginOrLogout.setOnClickListener(new View.OnClickListener() {
32 32
33 @Override 33 @Override
34 public void onClick(View v) { 34 public void onClick(View v) {
35 if (btnLoginOrLogout.getTag() == null || (Integer) btnLoginOrLogout.getTag() == 0) 35 if (btnLoginOrLogout.getTag() == null || (Integer) btnLoginOrLogout.getTag() == 0)
36 GumpSDK.start(MainActivity.this); 36 GumpSDK.start(MainActivity.this);
37 else 37 else
38 GumpSDK.logout(MainActivity.this, MainActivity.this); 38 GumpSDK.logout(MainActivity.this, MainActivity.this);
39 } 39 }
40 }); 40 });
41 findViewById(R.id.pay).setOnClickListener(new View.OnClickListener() { 41 findViewById(R.id.pay).setOnClickListener(new View.OnClickListener() {
42 42
43 @Override 43 @Override
44 public void onClick(View v) { 44 public void onClick(View v) {
45 Bundle payInfo = new Bundle(); 45 Bundle payInfo = new Bundle();
46 payInfo.putString("nick", "thi"); 46 payInfo.putString("nick", "thi");
47 payInfo.putString("product", "元宝"); 47 payInfo.putString("product", "元宝");
48 payInfo.putFloat("amount", 0.0f); 48 payInfo.putFloat("amount", 0.0f);
49 payInfo.putString("extraInfo", "This is demo!"); 49 payInfo.putString("extraInfo", "This is demo!");
50 payInfo.putString("serverId", "5001"); 50 payInfo.putString("serverId", "5001");
51 payInfo.putString("roleId", "41081"); 51 payInfo.putString("roleId", "41081");
52 GumpSDK.pay(MainActivity.this, payInfo); 52 GumpSDK.pay(MainActivity.this, payInfo,"3332768");
53 } 53 }
54 }); 54 });
55 GumpSDK.init(getApplicationContext(), appId, "93a27b0bd99bac3e68a440b48aa421ab", "1000"); 55 GumpSDK.init(getApplicationContext(), appId, "93a27b0bd99bac3e68a440b48aa421ab", "1000");
56 GumpSDK.setLogoShow(true); 56 GumpSDK.setLogoShow(true);
57 GumpSDK.setScreenLandscape(true);
57 tvVersion.setText("SDK Version:" + GumpSDK.getVersion()); 58 tvVersion.setText("SDK Version:" + GumpSDK.getVersion());
58 GumpSDK.start(this); 59 GumpSDK.start(this);
59 } 60 }
60 61
61 @Override 62 @Override
62 protected void onActivityResult(int requestCode, int resultCode, Intent data) { 63 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
63 Log.d("Main", "activity requestCode:" + requestCode + ",resultCode:" + resultCode); 64 Log.d("Main", "activity requestCode:" + requestCode + ",resultCode:" + resultCode);
64 if (requestCode == GumpSDK.LOGIN_REQUEST_CODE) { 65 if (requestCode == GumpSDK.LOGIN_REQUEST_CODE) {
65 if (resultCode == RESULT_OK) { 66 if (resultCode == RESULT_OK) {
66 String uid = data.getStringExtra("userId"); 67 String uid = data.getStringExtra("userId");
67 int accountType = data.getIntExtra("accountType", -1); 68 int accountType = data.getIntExtra("accountType", -1);
68 String sessionkey = data.getStringExtra("sessionKey"); 69 String sessionkey = data.getStringExtra("sessionKey");
69 userInfo.setText(" userid:" + uid + "\n accountType:" + accountType + "\n sessionKey:" + sessionkey); 70 userInfo.setText(" userid:" + uid + "\n accountType:" + accountType + "\n sessionKey:" + sessionkey);
70 btnLoginOrLogout.setText("Logout"); 71 btnLoginOrLogout.setText("Logout");
71 btnLoginOrLogout.setTag(1); 72 btnLoginOrLogout.setTag(1);
72 } else if (resultCode == RESULT_CANCELED) { 73 } else if (resultCode == RESULT_CANCELED) {
73 Toast.makeText(this, "operate be canceled", Toast.LENGTH_SHORT).show(); 74 Toast.makeText(this, "operate be canceled", Toast.LENGTH_SHORT).show();
74 } 75 }
75 } 76 }
76 //@Deprecated 77 // @Deprecated
77 // else if (requestCode == GumpSDK.PAY_REQUEST_CODE) { 78 // else if (requestCode == GumpSDK.PAY_REQUEST_CODE) {
78 // if (resultCode == RESULT_OK) { 79 // if (resultCode == RESULT_OK) {
79 // int code = data.getIntExtra("code", -1); 80 // int code = data.getIntExtra("code", -1);
80 // String msg = data.getStringExtra("msg"); 81 // String msg = data.getStringExtra("msg");
81 // String orderId = data.getStringExtra("orderId"); 82 // String orderId = data.getStringExtra("orderId");
82 // String extraInfo = data.getStringExtra("extraInfo"); 83 // String extraInfo = data.getStringExtra("extraInfo");
83 // Toast.makeText(this, "pay result: " + code + "," + msg + ",orderId:" + orderId + ",extraInfo:" + extraInfo, Toast.LENGTH_SHORT).show(); 84 // Toast.makeText(this, "pay result: " + code + "," + msg + ",orderId:" + orderId + ",extraInfo:" + extraInfo, Toast.LENGTH_SHORT).show();
84 // } else if (resultCode == RESULT_CANCELED) { 85 // } else if (resultCode == RESULT_CANCELED) {
85 // Toast.makeText(this, "operate be canceled", Toast.LENGTH_SHORT).show(); 86 // Toast.makeText(this, "operate be canceled", Toast.LENGTH_SHORT).show();
86 // } 87 // }
87 // } 88 // }
88 super.onActivityResult(requestCode, resultCode, data); 89 super.onActivityResult(requestCode, resultCode, data);
89 } 90 }
90 91
91 @Override 92 @Override
92 public void onLogout() { 93 public void onLogout() {
93 btnLoginOrLogout.setText("Login"); 94 btnLoginOrLogout.setText("Login");
94 btnLoginOrLogout.setTag(0); 95 btnLoginOrLogout.setTag(0);
95 userInfo.append("\n User is logout"); 96 userInfo.append("\n User is logout");
96 } 97 }
97 98
98 } 99 }
99 100