更新日期:2022-02-18Android接入文档
1. 添加资源
Gradle添加依赖
implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:recyclerview-v7:27.1.1'
如果应用里用了recyclerview,就用应用自己的版本
2. 未登录或登录成功后初始化参数没有传空
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");
3. 接口接入
QKCustomService.getInstance().setCustomServiceBean(getCustomServiceBean())
protected void onStart() { super.onStart(); // 生命周期接口调用(必接) QKCustomService.getInstance().onStart(this); } @Override protected void onDestroy() { super.onDestroy(); // 生命周期接口调用(必接) QKCustomService.getInstance().onDestroy(this); }
3.3 显示影藏客服浮标
private void toggleFloat() { boolean showFloat = QKCustomService.getInstance().isShowFloat(); if (showFloat){//已显示 影藏 QKCustomService.getInstance().closeFloatMenu(this); }else {//已影藏 显示 QKCustomService.getInstance().showFloatMenu(this); } }
QKCustomService.getInstance().goChatActivity(this);
4. 出包
如果是使用quicksdk打包工具出包,需要将母包清单文件修改为quick的占位符,如果不是通过聚合工具出渠道包则忽略此步骤
5. CustomServiceBean类参数说明
参数名称
参数说明
uid
uid
userName
用户昵称
userBalance
当前余额
nickId
当前用户ID
nickName
当前用户名
nickNameNote
当前用户所属区
appid
QuickSdk客服后台申请的产品code
vipLevel
当前角色vip等级
iconUrl
当前用户头像
platform
设备平台
title
进入客服界面title
sessionid
用户登录后的sessionid
deviceName
设备名称
6. 其他设置
6.1 glide版本设置
picture_library里面用到了glide 4.0.0, 若应用也用到了glide其他版本,可选择no-glide的版本
Picture_library 用到了这些三方jar包 接入方可以根据自己接入情况删除 (更名为rar,在lib下面操作,再更名为aar)
李先生:13880511661
QQ:48157910
赵先生:15390049857
QQ:1077535763
孙女士:13551010407
QQ:1799614139
QQ群:698731538