lizhihui

Update 公共SDK客户端接入文档.md

...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 #### 1.3、修改游戏工程的AndroidManifest.xml(可以参照复制Demo中 AndroidManifest.xml文件) #### 20 #### 1.3、修改游戏工程的AndroidManifest.xml(可以参照复制Demo中 AndroidManifest.xml文件) ####
21 21
22 - 添加声明权限: 22 - 添加声明权限:
23 - 23 +
24 ```xml 24 ```xml
25 <uses-permission android:name="android.permission.INTERNET" /> 25 <uses-permission android:name="android.permission.INTERNET" />
26 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 26 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
122 } 122 }
123 } 123 }
124 ``` 124 ```
125 -#### 2.2、初始化接口(必接) #### 125 +#### 2.2、初始化接口(必接) ####
126 接口说明: 126 接口说明:
127 首先在程序开始的地方调用 SDK 的初始化 init 方法,并设 置 Activity 对像和初始化完成回调 127 首先在程序开始的地方调用 SDK 的初始化 init 方法,并设 置 Activity 对像和初始化完成回调
128 监听(在初始化失败情况下不 再调用其它 SDK 接口方法) 128 监听(在初始化失败情况下不 再调用其它 SDK 接口方法)
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
160 160
161 接口说明:游戏登录时调用 161 接口说明:游戏登录时调用
162 162
163 -#### 2.3.1、方法定义 #### 163 +#### 2.3.1、方法定义 ####
164 164
165 ```java 165 ```java
166 public static void login(final String paramCustom,final PoolLoginListener poolLoginListener) 166 public static void login(final String paramCustom,final PoolLoginListener poolLoginListener)
...@@ -196,19 +196,19 @@ public static void login(final String paramCustom,final PoolLoginListener poolLo ...@@ -196,19 +196,19 @@ public static void login(final String paramCustom,final PoolLoginListener poolLo
196 196
197 ``` 197 ```
198 198
199 -#### 2.4、提交角色数据接口(必接) #### 199 +#### 2.4、提交角色数据接口(必接) ####
200 接口说明:游戏提交角色数据接口,该接口需要在以下3中情况下调用: 200 接口说明:游戏提交角色数据接口,该接口需要在以下3中情况下调用:
201 201
202 进入游戏主场景、创建角色、角色升级 202 进入游戏主场景、创建角色、角色升级
203 203
204 **(如果游戏创建角色时没有角色名,需要在用户创建角色名时调用多一次进入游戏统计,否则用户名无法正常统计,投放测试无法通过)** 204 **(如果游戏创建角色时没有角色名,需要在用户创建角色名时调用多一次进入游戏统计,否则用户名无法正常统计,投放测试无法通过)**
205 205
206 -#### 2.4.1、方法定义 #### 206 +#### 2.4.1、方法定义 ####
207 207
208 ```java 208 ```java
209 public static void submitRoleData(final PoolRoleInfo poolRoleInfo,final PoolRoleListener poolRoleListener) 209 public static void submitRoleData(final PoolRoleInfo poolRoleInfo,final PoolRoleListener poolRoleListener)
210 ``` 210 ```
211 -#### 2.4.2、参数说明 #### 211 +#### 2.4.2、参数说明 ####
212 212
213 | 参数 | 说明 | 213 | 参数 | 说明 |
214 | ---------------- | ---------------- | 214 | ---------------- | ---------------- |
...@@ -338,21 +338,21 @@ public static void pay(final PoolPayInfo poolPayInfo,final PoolPayListener poolP ...@@ -338,21 +338,21 @@ public static void pay(final PoolPayInfo poolPayInfo,final PoolPayListener poolP
338 }); 338 });
339 ``` 339 ```
340 340
341 -#### 2.6、检测 SDK 是否含有用户中心接口(必接) #### 341 +#### 2.6、检测 SDK 是否含有用户中心接口(必接) ####
342 342
343 说明:如果接口返回为 true,表示需要游戏方在合适的界面中添加一个用户中心的按钮,点击按钮时调用文档中 2.7 的用户中心接口; 343 说明:如果接口返回为 true,表示需要游戏方在合适的界面中添加一个用户中心的按钮,点击按钮时调用文档中 2.7 的用户中心接口;
344 344
345 如果返回 false,则不做处理 345 如果返回 false,则不做处理
346 346
347 -#### 2.6.1、方法定义 #### 347 +#### 2.6.1、方法定义 ####
348 ```java 348 ```java
349 public static boolean hasChannelCenter() 349 public static boolean hasChannelCenter()
350 ``` 350 ```
351 -#### 2.7、用户中心接口(必接) #### 351 +#### 2.7、用户中心接口(必接) ####
352 352
353 说明:打开渠道用户中心界面 353 说明:打开渠道用户中心界面
354 354
355 -#### 2.7.1、方法定义 #### 355 +#### 2.7.1、方法定义 ####
356 ```java 356 ```java
357 public static void openChannelCenter() 357 public static void openChannelCenter()
358 ``` 358 ```
...@@ -454,7 +454,7 @@ public static void showExitDialog(final PoolExitDialogListener exitDialogListene ...@@ -454,7 +454,7 @@ public static void showExitDialog(final PoolExitDialogListener exitDialogListene
454 说明:在游戏 Activity 的 onStart、onPause、onResume、 onStop、onDestroy、onRestart、onNewIntent、 onActivityResult、onConfigurationChanged、onSaveInstanceState、onRestoreInstanceState、onWindowFocusChanged、onWindowAttributesChanged 中分别调用对应的接口 454 说明:在游戏 Activity 的 onStart、onPause、onResume、 onStop、onDestroy、onRestart、onNewIntent、 onActivityResult、onConfigurationChanged、onSaveInstanceState、onRestoreInstanceState、onWindowFocusChanged、onWindowAttributesChanged 中分别调用对应的接口
455 455
456 ```java 456 ```java
457 - 2.10.1代码示例 457 + 2.10.1 代码示例
458 @Override 458 @Override
459 public void onStart() { 459 public void onStart() {
460 super.onStart(); 460 super.onStart();
...@@ -569,7 +569,7 @@ public static void showExitDialog(final PoolExitDialogListener exitDialogListene ...@@ -569,7 +569,7 @@ public static void showExitDialog(final PoolExitDialogListener exitDialogListene
569 ```java 569 ```java
570 public static void logout(final Activity paramActivity) ; 570 public static void logout(final Activity paramActivity) ;
571 ``` 571 ```
572 -#### 2.15.2、参数说明 #### 572 +#### 2.15.2、参数说明 ####
573 573
574 | 参数 | 说明 | 574 | 参数 | 说明 |
575 | ------------- | ---- | 575 | ------------- | ---- |
...@@ -584,16 +584,16 @@ public static void logout(final Activity paramActivity) ; ...@@ -584,16 +584,16 @@ public static void logout(final Activity paramActivity) ;
584 } 584 }
585 ``` 585 ```
586 586
587 -### 2.16、切换账号接口 ### 587 +### 2.16、切换账号接口 ###
588 588
589 说明:该接口在游戏切换账号时调用,切换成功回通知到登录监听回调中,调用前请判断是否含有此接口(hasSwitchAccount()) 589 说明:该接口在游戏切换账号时调用,切换成功回通知到登录监听回调中,调用前请判断是否含有此接口(hasSwitchAccount())
590 590
591 -#### 2.16.1、方法定义 #### 591 +#### 2.16.1、方法定义 ####
592 ```java 592 ```java
593 public static void switchAccount(final Activity paramActivity); 593 public static void switchAccount(final Activity paramActivity);
594 ``` 594 ```
595 595
596 -#### 2.16.2、参数说明 #### 596 +#### 2.16.2、参数说明 ####
597 | 参数 | 说明 | 597 | 参数 | 说明 |
598 | ------------- | ---- | 598 | ------------- | ---- |
599 | paramActivity | 上下文 | 599 | paramActivity | 上下文 |
...@@ -610,7 +610,7 @@ public static void switchAccount(final Activity paramActivity); ...@@ -610,7 +610,7 @@ public static void switchAccount(final Activity paramActivity);
610 } 610 }
611 ``` 611 ```
612 612
613 -### 2.17、聊天统计 ### 613 +### 2.17、聊天统计 ###
614 614
615 说明:在用户发送聊天信息时调用该接口 615 说明:在用户发送聊天信息时调用该接口
616 616
......