本文整理汇总了Java中io.rong.imkit.RongIM.init方法的典型用法代码示例。如果您正苦于以下问题:Java RongIM.init方法的具体用法?Java RongIM.init怎么用?Java RongIM.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.rong.imkit.RongIM
的用法示例。
在下文中一共展示了RongIM.init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performInit
import io.rong.imkit.RongIM; //导入方法依赖的package包/类
private void performInit(){
//注册融云小米push
RongPushClient.registerMiPush(getApplicationContext(), Constants.XIAOMI_APPID, Constants.XIAOMI_APPKEY);
//初始化融云
RongIM.init(getApplicationContext());
//设置支持消息回执的会话类型
Conversation.ConversationType[] types = new Conversation.ConversationType[]{
Conversation.ConversationType.PRIVATE,
Conversation.ConversationType.GROUP,
Conversation.ConversationType.DISCUSSION
};
RongIM.getInstance().setReadReceiptConversationTypeList(types);
try {
StatService.startStatService(getApplicationContext(), Constants.MAT_APPKEY, StatConstants.VERSION);
//开启Java Crash异常捕获
StatCrashReporter.getStatCrashReporter(getApplicationContext()).setJavaCrashHandlerStatus(true);
//开启Native异常捕获
// StatCrashReporter.getStatCrashReporter(getApplicationContext()).setJniNativeCrashStatus(true);
} catch (MtaSDkException e) {
e.printStackTrace();
}
//只在MainActivity上显示升级对话框
Beta.canShowUpgradeActs.add(MainActivity.class);
//初始化腾讯Bugly
Bugly.init(getApplicationContext(), Constants.BUGLY_APPID, BuildConfig.LOG_DEBUG);
}
示例2: onCreate
import io.rong.imkit.RongIM; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
AppContext = getApplicationContext();
application = this;
if (!LeakCanary.isInAnalyzerProcess(this)) {
LeakCanary.install(this);
}
//注册融云小米push
RongPushClient.registerMiPush(this, Constants.XIAOMI_APPID, Constants.XIAOMI_APPKEY);
//初始化融云
RongIM.init(getApplicationContext());
//设置支持消息回执的会话类型
Conversation.ConversationType[] types = new Conversation.ConversationType[]{
Conversation.ConversationType.PRIVATE,
Conversation.ConversationType.GROUP,
Conversation.ConversationType.DISCUSSION
};
RongIM.getInstance().setReadReceiptConversationTypeList(types);
try {
StatConfig.init(this);
StatService.startStatService(this, Constants.MAT_APPKEY, StatConstants.VERSION);
//开启Java Crash异常捕获
StatCrashReporter.getStatCrashReporter(this).setJavaCrashHandlerStatus(true);
//开启Native异常捕获
// StatCrashReporter.getStatCrashReporter(getApplicationContext()).setJniNativeCrashStatus(true);
} catch (MtaSDkException e) {
e.printStackTrace();
}
//只在MainActivity上显示升级对话框
Beta.canShowUpgradeActs.add(MainActivity.class);
//初始化腾讯Bugly
Bugly.init(this, Constants.BUGLY_APPID, BuildConfig.LOG_DEBUG);
Bugly.setIsDevelopmentDevice(this, BuildConfig.LOG_DEBUG);
}