xuguohong

del oaid

1 -{
2 - "supplier":{
3 - "vivo":{
4 - "appid":"100215079"
5 - },
6 - "xiaomi":{
7 -
8 - },
9 - "huawei":{
10 -
11 - },
12 - "oppo":{
13 -
14 - }
15 - }
16 -
17 -}
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4"> 2 <project version="4">
3 - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> 3 + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
4 <output url="file://$PROJECT_DIR$/build/classes" /> 4 <output url="file://$PROJECT_DIR$/build/classes" />
5 </component> 5 </component>
6 <component name="ProjectType"> 6 <component name="ProjectType">
......
...@@ -19,4 +19,5 @@ android { ...@@ -19,4 +19,5 @@ android {
19 19
20 dependencies { 20 dependencies {
21 implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') 21 implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
22 + // implementation 'com.android.support.constraint:constraint-layout:1.0.2'
22 } 23 }
......
No preview for this file type
1 -{
2 - "supplier":{
3 - "vivo":{
4 - "appid":"100215079"
5 - },
6 - "xiaomi":{
7 -
8 - },
9 - "huawei":{
10 -
11 - },
12 - "oppo":{
13 -
14 - }
15 - }
16 -
17 -}
...@@ -50,6 +50,7 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -50,6 +50,7 @@ public class AppActivity extends Activity implements OnClickListener {
50 private Button btOpenChannel; 50 private Button btOpenChannel;
51 private Button btSwitchAcc; 51 private Button btSwitchAcc;
52 private Button btOpenBbs; 52 private Button btOpenBbs;
53 + private Button btQueryProducts;
53 54
54 //提示LOG 55 //提示LOG
55 private TextView txMsg,txSdkMsg; 56 private TextView txMsg,txSdkMsg;
...@@ -129,6 +130,21 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -129,6 +130,21 @@ public class AppActivity extends Activity implements OnClickListener {
129 break; 130 break;
130 case PoolSDKCode.POOLSDK_INIT_FAIL: 131 case PoolSDKCode.POOLSDK_INIT_FAIL:
131 break; 132 break;
133 + case 1000://PoolSDKCode.POOLSDK_QUERY_WITH_PRODUCTS
134 + //msg:为查询的结果值
135 + /**
136 + * {//查询商品信息返回数据
137 + * "android.test.purchased0": {//key为商品ID
138 + * "displayPrice": "₩1167.28",//显示价格
139 + * "price": "₩1,167", //实际价格(去除小数点) 充值传递
140 + * "priceAmountMicros": 1167284249, //数字价格
141 + * "priceCurrencyCode": "KRW", //货币代码
142 + * "sku": "android.test.purchased0",//商品ID
143 + * "title": "名称示例"
144 + * }
145 + * }
146 + */
147 + break;
132 default: 148 default:
133 break; 149 break;
134 } 150 }
...@@ -147,7 +163,6 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -147,7 +163,6 @@ public class AppActivity extends Activity implements OnClickListener {
147 } 163 }
148 }); 164 });
149 165
150 -
151 txSdkMsg.setText("sdksimplename:"+ PoolSdkConfig.getConfigByKey("sdksimplename") 166 txSdkMsg.setText("sdksimplename:"+ PoolSdkConfig.getConfigByKey("sdksimplename")
152 +"\nsdkversioncode:"+PoolSdkConfig.getConfigByKey("sdkversioncode") 167 +"\nsdkversioncode:"+PoolSdkConfig.getConfigByKey("sdkversioncode")
153 +"\ngamesimplename:"+PoolSdkConfig.getConfigByKey("gamesimplename") 168 +"\ngamesimplename:"+PoolSdkConfig.getConfigByKey("gamesimplename")
...@@ -305,6 +320,7 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -305,6 +320,7 @@ public class AppActivity extends Activity implements OnClickListener {
305 btOpenChannel = (Button) findViewById(getRedIdByName("pb_bt_openchannel", "id")); 320 btOpenChannel = (Button) findViewById(getRedIdByName("pb_bt_openchannel", "id"));
306 btSwitchAcc = (Button) findViewById(getRedIdByName("pb_bt_switchacc", "id")); 321 btSwitchAcc = (Button) findViewById(getRedIdByName("pb_bt_switchacc", "id"));
307 btOpenBbs = (Button) findViewById(getRedIdByName("pb_bt_openbbs", "id")); 322 btOpenBbs = (Button) findViewById(getRedIdByName("pb_bt_openbbs", "id"));
323 + btQueryProducts = findViewById(getRedIdByName("pool_query_products_id","id"));
308 324
309 txMsg = (TextView) findViewById(getRedIdByName("tx_msg", "id")); 325 txMsg = (TextView) findViewById(getRedIdByName("tx_msg", "id"));
310 txSdkMsg = (TextView) findViewById(getRedIdByName("tx_sdk_msg", "id")); 326 txSdkMsg = (TextView) findViewById(getRedIdByName("tx_sdk_msg", "id"));
...@@ -317,6 +333,7 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -317,6 +333,7 @@ public class AppActivity extends Activity implements OnClickListener {
317 btOpenChannel.setOnClickListener(this); 333 btOpenChannel.setOnClickListener(this);
318 btSwitchAcc.setOnClickListener(this); 334 btSwitchAcc.setOnClickListener(this);
319 btOpenBbs.setOnClickListener(this); 335 btOpenBbs.setOnClickListener(this);
336 + btQueryProducts.setOnClickListener(this);
320 } 337 }
321 338
322 public void yaOnClick(View view) { 339 public void yaOnClick(View view) {
...@@ -341,6 +358,8 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -341,6 +358,8 @@ public class AppActivity extends Activity implements OnClickListener {
341 switchAccount(); 358 switchAccount();
342 }else if (view == btOpenBbs) { 359 }else if (view == btOpenBbs) {
343 trackEvent(); 360 trackEvent();
361 + }else if(view == btQueryProducts){
362 + queryProducts();
344 } 363 }
345 } 364 }
346 365
...@@ -510,4 +529,14 @@ public class AppActivity extends Activity implements OnClickListener { ...@@ -510,4 +529,14 @@ public class AppActivity extends Activity implements OnClickListener {
510 }); 529 });
511 } 530 }
512 531
532 + /**
533 + * 商品查询接口
534 + */
535 + private void queryProducts(){
536 + Map productMap = new HashMap<Object,Object>();
537 + productMap.put("productId1","");
538 + productMap.put("productId2","");
539 + PoolSdkHelper.callFunc("queryWithProducts",productMap);
540 + }
541 +
513 } 542 }
......
...@@ -85,6 +85,12 @@ ...@@ -85,6 +85,12 @@
85 </LinearLayout> 85 </LinearLayout>
86 </LinearLayout> 86 </LinearLayout>
87 87
88 + <Button
89 + android:id="@+id/pool_query_products_id"
90 + android:layout_width="195dp"
91 + android:layout_height="wrap_content"
92 + android:text="商品查询" />
93 +
88 <TextView 94 <TextView
89 android:layout_width="fill_parent" 95 android:layout_width="fill_parent"
90 android:layout_height="wrap_content" 96 android:layout_height="wrap_content"
......
...@@ -83,6 +83,21 @@ android.permission.READ_PHONE_STATE` ...@@ -83,6 +83,21 @@ android.permission.READ_PHONE_STATE`
83 break; 83 break;
84 case PoolSDKCode.POOLSDK_INIT_FAIL: 84 case PoolSDKCode.POOLSDK_INIT_FAIL:
85 break; 85 break;
86 + case PoolSDKCode.POOLSDK_QUERY_WITH_PRODUCTS://查询商品信息返回
87 + //msg:为查询的结果值
88 + /**
89 + * {//查询商品信息返回数据
90 + * "android.test.purchased0": {//key为商品ID
91 + * "displayPrice": "₩1167.28",//显示价格
92 + * "price": "₩1,167", //实际价格(去除小数点) 充值传递
93 + * "priceAmountMicros": 1167284249, //数字价格
94 + * "priceCurrencyCode": "KRW", //货币代码
95 + * "sku": "android.test.purchased0",//商品ID
96 + * "title": "名称示例"
97 + * }
98 + * }
99 + */
100 + break;
86 } 101 }
87 } 102 }
88 }); 103 });
...@@ -599,6 +614,7 @@ PoolEventType类中对应的类型: ...@@ -599,6 +614,7 @@ PoolEventType类中对应的类型:
599 POOL_FIRST_DAY_CHECKPOINT_TO_VALUE 副本关卡(创角首日达到的某个关卡)(具体关卡cp跟渠道沟通) 614 POOL_FIRST_DAY_CHECKPOINT_TO_VALUE 副本关卡(创角首日达到的某个关卡)(具体关卡cp跟渠道沟通)
600 POOL_ENTER_PARTY 加入公会/联盟等 615 POOL_ENTER_PARTY 加入公会/联盟等
601 POOL_FIRST_DAY_UPDATE_TO_LEVEL1 首日更新到某个等级(具体等级cp跟渠道沟通) 616 POOL_FIRST_DAY_UPDATE_TO_LEVEL1 首日更新到某个等级(具体等级cp跟渠道沟通)
617 + POOL_UPDATE_TO_LEVEL 更新到某个等级
602 POOL_FIRST_RECHARGE 首冲 618 POOL_FIRST_RECHARGE 首冲
603 POOL_PAY_SUCCESS 充值成功 619 POOL_PAY_SUCCESS 充值成功
604 POOL_FIRST_DAY_RECHARGE_TO_VALUE 首日充值达到某个值时(具体数值cp跟渠道沟通) 620 POOL_FIRST_DAY_RECHARGE_TO_VALUE 首日充值达到某个值时(具体数值cp跟渠道沟通)
...@@ -613,7 +629,8 @@ PoolEventType类中对应的类型: ...@@ -613,7 +629,8 @@ PoolEventType类中对应的类型:
613 代码示例: 629 代码示例:
614 ``` 630 ```
615 充值成功类型例子: 631 充值成功类型例子:
616 -Map<String,Object> valueMap = new HashMap<>(); valueMap.put(PoolEventParameterName.POOL_ORDER_ID,System.currentTimeMillis()+"");//订单号 632 +Map<String,Object> valueMap = new HashMap<>();
633 +valueMap.put(PoolEventParameterName.POOL_ORDER_ID,System.currentTimeMillis()+"");//订单号
617 valueMap.put(PoolEventParameterName.POOL_CURRENCY,"USD");//货币类型 USD:美元 CNY:人民币 634 valueMap.put(PoolEventParameterName.POOL_CURRENCY,"USD");//货币类型 USD:美元 CNY:人民币
618 valueMap.put(PoolEventParameterName.POOL_PRICE,6);//充值金额 635 valueMap.put(PoolEventParameterName.POOL_PRICE,6);//充值金额
619 PoolSdkHelper.trackEvent(getApplicationContext(),PoolEventType.POOL_PAY_SUCCESS,valueMap); 636 PoolSdkHelper.trackEvent(getApplicationContext(),PoolEventType.POOL_PAY_SUCCESS,valueMap);
...@@ -623,7 +640,29 @@ PoolSdkHelper.trackEvent(getApplicationContext(), PoolEventType.POOL_RES_LOADED, ...@@ -623,7 +640,29 @@ PoolSdkHelper.trackEvent(getApplicationContext(), PoolEventType.POOL_RES_LOADED,
623 ``` 640 ```
624 641
625 642
643 +### 2.19、商品查询接口(查询结果返回在初始化回调中,具体可查看初始化接口或者Demo)
644 +```java
645 + /**
646 + * 拓展方法
647 + *
648 + * @param funcName 方法名(查询商品接口传"queryWithProducts")
649 + * @param param 传递参数(此处Map传键为商品ID值为空)
650 + * @return
651 + */
652 + public static String callFunc(String funcName, Map<Object, Object> param) {
653 +```
654 +
655 +代码示例:
656 +```java
657 + Map productMap = new HashMap<Object, Object>();
658 + productMap.put("商品ID", "");
659 + productMap.put("商品ID", "");
660 + PoolSdkHelper.callFunc("queryWithProducts", productMap);
661 +```
662 +
663 +
626 # 3、自测用例 # 664 # 3、自测用例 #
665 +
627 ### 3.1、接入环境下调用登录sdk会有默认测试账号进行登录,游戏会直接收到登录回调数据 ### 666 ### 3.1、接入环境下调用登录sdk会有默认测试账号进行登录,游戏会直接收到登录回调数据 ###
628 667
629 - 成功收到登录回调,与服务端校验成功进入游戏 668 - 成功收到登录回调,与服务端校验成功进入游戏
......
No preview for this file type