本文整理汇总了Java中io.rong.imlib.model.CSCustomServiceInfo类的典型用法代码示例。如果您正苦于以下问题:Java CSCustomServiceInfo类的具体用法?Java CSCustomServiceInfo怎么用?Java CSCustomServiceInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CSCustomServiceInfo类属于io.rong.imlib.model包,在下文中一共展示了CSCustomServiceInfo类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClick
import io.rong.imlib.model.CSCustomServiceInfo; //导入依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.start_user_profile://头像和Name条目点击
startActivity(new Intent(getActivity(), MyAccountActivity.class));
break;
case R.id.mine_setting://账号设置条目
startActivity(new Intent(getActivity(), AccountSettingActivity.class));
break;
case R.id.mine_service://意见反馈
CSCustomServiceInfo.Builder builder = new CSCustomServiceInfo.Builder();
builder.province("北京");
builder.city("北京");
RongIM.getInstance().startCustomerServiceChat(getActivity(), "KEFU146001495753714", "在线客服", builder.build());
// KEFU146001495753714 正式 KEFU145930951497220 测试 小能: zf_1000_1481459114694 zf_1000_1480591492399
break;
case R.id.mine_xiaoneng://小能客服 暂时隐藏
CSCustomServiceInfo.Builder builder1 = new CSCustomServiceInfo.Builder();
builder1.province("北京");
builder1.city("北京");
RongIM.getInstance().startCustomerServiceChat(getActivity(), "zf_1000_1481459114694", "在线客服", builder1.build());
break;
case R.id.mine_about://关于
mNewVersionView.setVisibility(View.GONE);
Intent intent = new Intent(getActivity(), AboutRongCloudActivity.class);
//是否有新的版本可用
intent.putExtra("isHasNewVersion", isHasNewVersion);
//携带新版本网络位置
if (!TextUtils.isEmpty(url)) {
intent.putExtra("url", url);
}
startActivity(intent);
break;
case R.id.my_wallet://钱包
JrmfClient.intentWallet(getActivity());
break;
}
}
示例2: onClick
import io.rong.imlib.model.CSCustomServiceInfo; //导入依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.start_user_profile:
startActivity(new Intent(getActivity(), MyAccountActivity.class));
break;
case R.id.mine_setting:
startActivity(new Intent(getActivity(), AccountSettingActivity.class));
break;
case R.id.mine_service:
CSCustomServiceInfo.Builder builder = new CSCustomServiceInfo.Builder();
builder.province("北京");
builder.city("北京");
RongIM.getInstance().startCustomerServiceChat(getActivity(), "KEFU146001495753714", "在线客服", builder.build());
// KEFU146001495753714 正式 KEFU145930951497220 测试 小能: zf_1000_1481459114694 zf_1000_1480591492399
break;
case R.id.mine_xiaoneng:
CSCustomServiceInfo.Builder builder1 = new CSCustomServiceInfo.Builder();
builder1.province("北京");
builder1.city("北京");
RongIM.getInstance().startCustomerServiceChat(getActivity(), "zf_1000_1481459114694", "在线客服", builder1.build());
break;
case R.id.mine_about:
mNewVersionView.setVisibility(View.GONE);
Intent intent = new Intent(getActivity(), AboutRongCloudActivity.class);
intent.putExtra("isHasNewVersion", isHasNewVersion);
if (!TextUtils.isEmpty(url)) {
intent.putExtra("url", url);
}
startActivity(intent);
break;
case R.id.my_wallet:
JrmfClient.intentWallet(getActivity());
break;
}
}
示例3: jsmethod_startCustomService
import io.rong.imlib.model.CSCustomServiceInfo; //导入依赖的package包/类
@UzJavascriptMethod
public void jsmethod_startCustomService(UZModuleContext context) {
String kefuId = context.optString("kefuId", null);
if (TextUtils.isEmpty(kefuId)) {
callModuleError(context, new RongException(ErrorCode.ARGUMENT_EXCEPTION));
return;
}
if (mRongClient == null) {
callModuleError(context, new RongException(ErrorCode.NOT_CONNECTED));
return;
}
String nickName = context.optString("nickName", null);
CSCustomServiceInfo info = new CSCustomServiceInfo.Builder()
.nickName(nickName).build();
CustomServiceListener csListener = null;
if (customServiceCache != null)
csListener = customServiceCache.get(kefuId);
if (csListener == null)
csListener = new CustomServiceListener(context);
mRongClient.startCustomService(kefuId, csListener, info);
}