更新日期:2022年 02月 18日Android接入文档
<p>
<span style="font-size:14px;"><strong>1. 添加资源</strong></span>
</p>
<p>
<span style="font-size:14px;"><strong><br />
</strong></span>
</p>
<p>
<span style="font-size:14px;"> </span><img src="https://staticsite.quickapi.net/data/newFiles/20220218/20220218170006D2AJ684.png" alt="" style="font-size:14px;" />
</p>
<p>
<br />
</p>
<p>
<span style="white-space:normal;font-size:14px;">Gradle添加依赖</span>
</p>
<pre class="brush:js;toolbar:false">implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'</pre>
<p>
<span style="font-size:14px;">如果应用里用了recyclerview,就用应用自己的版本</span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;"><strong><br />
</strong></span>
</p>
<p>
<span style="font-size:14px;"><strong>2. 未登录或登录成功后初始化参数没有传空</strong></span>
</p>
<p>
<span style="font-size:14px;"><strong><br />
</strong></span>
</p>
<pre class="brush:js;toolbar:false">CustomServiceBean customServiceBean = new CustomServiceBean();
customServiceBean.setUid(""+userInfo.getUID()); //玩家uid
customServiceBean.setUsername(""+userInfo.getUserName()); //玩家用户名
customServiceBean.setUserBalance("38"); //角色余额
customServiceBean.setNickId("110000037"); //用户id
customServiceBean.setNickName("天怒惊雷"); //用户名称
customServiceBean.setNickNameRote("zzzz"); //所属于区
customServiceBean.setAppId("22780358870497643540117482425477"); //QuickSDK的appid
customServiceBean.setLanguageAppId("zh-TW","24993580500456944076884250027100");QuickSDK的appid 对应的语言简写 其他类似
// customServiceBean.setLanguageAppId("zh-ch","11145220560844504323138980545377");
// customServiceBean.setLanguageAppId("zh-TW","22780358870497643540117482425477");
// customServiceBean.setLanguageAppId("en-us","8cf0c4ea388c7d53435c1e361949f154");
// customServiceBean.setLanguageAppId("ja-jp","94023578614113111989515645672059");
customServiceBean.setVipLevel("5");
customServiceBean.setChannelCode("1");
customServiceBean.setIconUrl("https://console.quicksdk.com//data/iconFiles/201807/gameicon_20180711114256_66146_150.png");</pre>
<br />
<br />
<p>
<span style="font-size:14px;"><strong>3. 接口接入</strong></span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<span style="font-size:14px;">3.1 初始化客服参数</span>
<p>
<br />
</p>
<pre class="brush:js;toolbar:false">QKCustomService.getInstance().setCustomServiceBean(getCustomServiceBean())</pre>
<p>
<br />
</p>
<span style="font-size:14px;">3.2 生命周期接口</span><br />
<p>
<br />
</p>
<pre class="brush:js;toolbar:false"> protected void onStart() {
super.onStart();
// 生命周期接口调用(必接)
QKCustomService.getInstance().onStart(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
// 生命周期接口调用(必接)
QKCustomService.getInstance().onDestroy(this);
}</pre>
<p>
<br />
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;">3.3 显示影藏客服浮标</span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<pre class="brush:js;toolbar:false">private void toggleFloat() {
boolean showFloat = QKCustomService.getInstance().isShowFloat();
if (showFloat){//已显示 影藏
QKCustomService.getInstance().closeFloatMenu(this);
}else {//已影藏 显示
QKCustomService.getInstance().showFloatMenu(this);
}
}</pre>
<br />
<br />
<span style="font-size:14px;">3.4 跳转客服界面</span><br />
<br />
<pre class="brush:js;toolbar:false">QKCustomService.getInstance().goChatActivity(this);</pre>
<br />
<br />
<br />
<p>
<span style="font-size:14px;"><strong>4. 出包</strong></span>
</p>
<p>
<span style="font-size:14px;"><strong><br />
</strong></span>
</p>
<p>
<span style="font-size:14px;"><span style="white-space:normal;font-size:14px;">如果是使用quicksdk打包工具出包,需要<span style="white-space:normal;font-size:14px;">将</span>母包清单文件修改为quick的占位符</span>,如果不是通过聚合工具出渠道包则忽略此步骤</span>
</p>
<p>
<span style="font-size:14px;"><strong><img src="https://staticsite.quickapi.net/data/newFiles/20220218/20220218175549Ef5i684.png" alt="" /><br />
</strong></span>
</p>
<span style="font-size:14px;"> </span><br />
<br />
<p>
<span style="font-size:14px;"><strong>5. CustomServiceBean类参数说明</strong></span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;">
<table style="width:100%;" cellpadding="2" cellspacing="0" border="1" bordercolor="#000000">
<tbody>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">参数名称</span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">参数说明</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">uid</span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">uid</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">userName </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">用户昵称</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">userBalance </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">当前余额</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">nickId </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">当前用户ID</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">nickName </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">当前用户名</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">nickNameNote </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">当前用户所属区</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">appid</span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">QuickSdk客服后台申请的产品code</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">vipLevel </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">当前角色vip等级</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">iconUrl </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">当前用户头像</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">plat</span><span style="white-space:normal;font-size:14px;">form </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">设备平台</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">tit</span><span style="white-space:normal;font-size:14px;">le </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">进入客服界面title</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">se</span><span style="white-space:normal;font-size:14px;">ssionid </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">用户登录后的sessionid</span><br />
</td>
</tr>
<tr>
<td>
<span style="white-space:normal;font-size:14px;">device</span><span style="white-space:normal;font-size:14px;">Name </span><br />
</td>
<td>
<span style="white-space:normal;font-size:14px;">设备名称</span><br />
</td>
</tr>
</tbody>
</table>
<br />
</span>
</p>
<br />
<p>
<span style="font-size:14px;"><strong>6. 其他设置</strong></span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;">6.1 <span style="white-space:normal;font-size:14px;">glide版本设置</span></span>
</p>
<p>
<span style="font-size:14px;"><br />
</span>
</p>
<p>
<span style="font-size:14px;">picture_library里面用到了glide 4.0.0, 若应用也用到了glide其他版本,可选择no-glide的版本 </span>
</p>
<p>
<span style="white-space:normal;font-size:14px;">Picture_library 用到了这些三方jar包 接入方可以根据自己接入情况删除 (更名为rar,在lib下面操作,再更名为aar)</span>
</p>
<p>
<span style="font-size:14px;"><img src="https://staticsite.quickapi.net/data/newFiles/20220218/20220218182054MPGx342.png" alt="" /><br />
</span>
</p>
<br />
<br />
<span style="font-size:14px;">6.2 quickcostum里面用到了kotlin,若应用里面有koltin相关的东西可以用不带kotlin的版本</span><br />