Showing
2 changed files
with
11 additions
and
12 deletions
README.md
0 → 100644
1 | # 公共SDK接入文档 # | 1 | # 公共SDK接入文档 # |
2 | 2 | ||
3 | ## 接入必读 | 3 | ## 接入必读 |
4 | -`注意!targetSdkVersion建议设置22及以下版本` | 4 | +`注意!targetSdkVersion建议设置26及以下版本` |
5 | 5 | ||
6 | -`如果需使用高版本,游戏自身动态申请权限获取问题需要CP自行处理` | 6 | +`如果需使用26以上高版本,游戏自身需要的权限获取CP自行处理` |
7 | 7 | ||
8 | ` | 8 | ` |
9 | 接入公共SDK测试没问题后游戏必须删除掉assets下公共SDK相关资源 | 9 | 接入公共SDK测试没问题后游戏必须删除掉assets下公共SDK相关资源 |
10 | (sdk文件夹、sdk.zip、sdkconf.ini)、(supplierconfig.json文件需要保留) | 10 | (sdk文件夹、sdk.zip、sdkconf.ini)、(supplierconfig.json文件需要保留) |
11 | 删除manifest中关于公共SDK添加activity和service相关, | 11 | 删除manifest中关于公共SDK添加activity和service相关, |
12 | 删除libs下的YouYuSDK_190516.jar, | 12 | 删除libs下的YouYuSDK_190516.jar, |
13 | -然后打出一个母包,需要上哪个渠道使用打包工具进行打对应渠道包。 | 13 | +然后打出一个母包,需要上哪个渠道使用打包工具(4.6版本及以上)进行打对应渠道包。 |
14 | ` | 14 | ` |
15 | 15 | ||
16 | ## 1、开发环境搭建 ## | 16 | ## 1、开发环境搭建 ## |
17 | 以下是以 Eclipse 为例,在 Eclipse 环境下开发的 SDK 配置 | 17 | 以下是以 Eclipse 为例,在 Eclipse 环境下开发的 SDK 配置 |
18 | 18 | ||
19 | -#### 1.1、将 SDK 压缩包中 libs 目录下的所有 资源 包复制到游戏工程的libs 目录下 #### | 19 | +#### 1.1、将 SDK 压缩包中 libs 目录下的所有 资源 包复制到游戏工程的libs 目录下(Eclipse需要自行把aar文件提取) #### |
20 | 20 | ||
21 | #### 1.2、复制SDK压缩包中assets目录下的所有内容到游戏工程的assets目录 #### | 21 | #### 1.2、复制SDK压缩包中assets目录下的所有内容到游戏工程的assets目录 #### |
22 | 22 | ||
... | @@ -111,7 +111,6 @@ | ... | @@ -111,7 +111,6 @@ |
111 | public class XXXXApplication extends PoolSDKApplication { | 111 | public class XXXXApplication extends PoolSDKApplication { |
112 | @Override | 112 | @Override |
113 | public void onCreate() { | 113 | public void onCreate() { |
114 | - // TODO Auto-generated method stub | ||
115 | super.onCreate(); | 114 | super.onCreate(); |
116 | } | 115 | } |
117 | } | 116 | } |
... | @@ -322,7 +321,9 @@ public static void pay(final PoolPayInfo poolPayInfo,final PoolPayListener poolP | ... | @@ -322,7 +321,9 @@ public static void pay(final PoolPayInfo poolPayInfo,final PoolPayListener poolP |
322 | PoolSdkHelper.pay(poolPayInfo, new PoolPayListener() { | 321 | PoolSdkHelper.pay(poolPayInfo, new PoolPayListener() { |
323 | @Override | 322 | @Override |
324 | public void onPaySuccess(String paramCustom) { | 323 | public void onPaySuccess(String paramCustom) { |
324 | + //大部分渠道都没有客户端回调,支付成功结果以服务端回调为准 | ||
325 | System.out.println("支付成功 = " + paramCustom); | 325 | System.out.println("支付成功 = " + paramCustom); |
326 | + | ||
326 | } | 327 | } |
327 | @Override | 328 | @Override |
328 | public void onPayFailed(String paramCustom, String errorMsg) { | 329 | public void onPayFailed(String paramCustom, String errorMsg) { |
... | @@ -499,42 +500,36 @@ public static void showExitDialog(final PoolExitDialogListener exitDialogListene | ... | @@ -499,42 +500,36 @@ public static void showExitDialog(final PoolExitDialogListener exitDialogListene |
499 | 500 | ||
500 | @Override | 501 | @Override |
501 | public void onConfigurationChanged(Configuration newConfig) { | 502 | public void onConfigurationChanged(Configuration newConfig) { |
502 | - // TODO Auto-generated method stub | ||
503 | super.onConfigurationChanged(newConfig); | 503 | super.onConfigurationChanged(newConfig); |
504 | PoolSdkHelper.onConfigurationChanged(newConfig); | 504 | PoolSdkHelper.onConfigurationChanged(newConfig); |
505 | } | 505 | } |
506 | 506 | ||
507 | @Override | 507 | @Override |
508 | protected void onSaveInstanceState(Bundle outState) { | 508 | protected void onSaveInstanceState(Bundle outState) { |
509 | - // TODO Auto-generated method stub | ||
510 | super.onSaveInstanceState(outState); | 509 | super.onSaveInstanceState(outState); |
511 | PoolSdkHelper.onSaveInstanceState(outState); | 510 | PoolSdkHelper.onSaveInstanceState(outState); |
512 | } | 511 | } |
513 | 512 | ||
514 | @Override | 513 | @Override |
515 | protected void onRestoreInstanceState(Bundle savedInstanceState) { | 514 | protected void onRestoreInstanceState(Bundle savedInstanceState) { |
516 | - // TODO Auto-generated method stub | ||
517 | super.onRestoreInstanceState(savedInstanceState); | 515 | super.onRestoreInstanceState(savedInstanceState); |
518 | PoolSdkHelper.onRestoreInstanceState(savedInstanceState); | 516 | PoolSdkHelper.onRestoreInstanceState(savedInstanceState); |
519 | } | 517 | } |
520 | 518 | ||
521 | @Override | 519 | @Override |
522 | public void onWindowFocusChanged(boolean hasFocus) { | 520 | public void onWindowFocusChanged(boolean hasFocus) { |
523 | - // TODO Auto-generated method stub | ||
524 | super.onWindowFocusChanged(hasFocus); | 521 | super.onWindowFocusChanged(hasFocus); |
525 | PoolSdkHelper.onWindowFocusChanged(hasFocus); | 522 | PoolSdkHelper.onWindowFocusChanged(hasFocus); |
526 | } | 523 | } |
527 | 524 | ||
528 | @Override | 525 | @Override |
529 | public void onWindowAttributesChanged(LayoutParams params) { | 526 | public void onWindowAttributesChanged(LayoutParams params) { |
530 | - // TODO Auto-generated method stub | ||
531 | super.onWindowAttributesChanged(params); | 527 | super.onWindowAttributesChanged(params); |
532 | PoolSdkHelper.onWindowAttributesChanged(params); | 528 | PoolSdkHelper.onWindowAttributesChanged(params); |
533 | } | 529 | } |
534 | 530 | ||
535 | @Override | 531 | @Override |
536 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { | 532 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { |
537 | - // TODO Auto-generated method stub | ||
538 | super.onRequestPermissionsResult(requestCode, permissions, grantResults); | 533 | super.onRequestPermissionsResult(requestCode, permissions, grantResults); |
539 | PoolSdkHelper.onRequestPermissionsResult(requestCode, permissions, grantResults); | 534 | PoolSdkHelper.onRequestPermissionsResult(requestCode, permissions, grantResults); |
540 | } | 535 | } |
... | @@ -648,7 +643,7 @@ serverName | 服务器名称 | ... | @@ -648,7 +643,7 @@ serverName | 服务器名称 |
648 | 643 | ||
649 | # 4、母包 # | 644 | # 4、母包 # |
650 | ``` | 645 | ``` |
651 | -4.1、接入公共 SDK 编译生成的 apk 即为打包工具使用的母包(接入完成测试通过后 如果需要使用打包工具打渠道包则母包必须删除assets下的公共SDK相关资源(sdk文件夹、sdk.zip、sdkconfig.ini), libs下的YouaiSDK.jar,删除接入时manifest中添加的activity) | 646 | +4.1、接入公共 SDK 编译生成的 apk 即为打包工具(4.6及以上版本)使用的母包(接入完成测试通过后 如果需要使用打包工具打渠道包则母包必须删除assets下的公共SDK相关资源(sdk文件夹、sdk.zip、sdkconfig.ini), libs下的YouaiSDK.jar,删除接入时manifest中添加的activity) |
652 | ``` | 647 | ``` |
653 | 648 | ||
654 | # 5、单机无服务端时充值处理 # | 649 | # 5、单机无服务端时充值处理 # | ... | ... |
-
Please register or login to post a comment