本文整理汇总了Java中com.tencent.bugly.Bugly类的典型用法代码示例。如果您正苦于以下问题:Java Bugly类的具体用法?Java Bugly怎么用?Java Bugly使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Bugly类属于com.tencent.bugly包,在下文中一共展示了Bugly类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
// boxStore = MyObjectBox.builder().androidContext(this).build();
Context context = getApplicationContext();
// 获取当前包名
String packageName = context.getPackageName();
// 获取当前进程名
String processName = getProcessName(android.os.Process.myPid());
// 设置是否为上报进程
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
strategy.setUploadProcess(processName == null || processName.equals(packageName));
// 初始化Bugly
Bugly.init(getApplicationContext(), "1d65abe1b1", false);
Beta.initDelay = 1 * 1000;
// Beta.upgradeDialogLayoutId = R.layout.upgrade_dialog;
super.onCreate();
}
示例2: initBugly
import com.tencent.bugly.Bugly; //导入依赖的package包/类
private void initBugly(){
Beta.initDelay = 6 * 1000;
Beta.enableHotfix = false;
Beta.canShowUpgradeActs.add(LoginActivity.class);
Beta.canShowUpgradeActs.add(MainActivity.class);
Beta.canShowUpgradeActs.add(AboutActivity.class);
Beta.upgradeListener = UpgradeDialog.INSTANCE;
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(getApplicationContext());
strategy.setAppVersion(BuildConfig.VERSION_NAME);
strategy.setAppReportDelay(10 * 1000);
Bugly.init(getApplicationContext(), AppConfig.BUGLY_APPID, BuildConfig.DEBUG, strategy);
CrashReport.setIsDevelopmentDevice(getApplicationContext(), BuildConfig.DEBUG);
}
示例3: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//CrashReport.initCrashReport(getApplicationContext(), "900019352", false);
Bugly.init(getApplicationContext(), "900019352", false);
setContentView(R.layout.activity_main);
pluginStatusText = (TextView) findViewById(R.id.layout_control_accessibility_text);
pluginStatusIcon = (ImageView) findViewById(R.id.layout_control_accessibility_icon);
handleMaterialStatusBar();
explicitlyLoadPreferences();
//监听AccessibilityService 变化
accessibilityManager = (AccessibilityManager) getSystemService(Context.ACCESSIBILITY_SERVICE);
accessibilityManager.addAccessibilityStateChangeListener(this);
updateServiceStatus();
}
示例4: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
sInstance = this;
Bugly.init(getApplicationContext(), "6ace1b5b58", false);
}
示例5: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
retrofit = RetrofitManager.newInstance();
Bugly.init(getApplicationContext(), getString(R.string.bugly_app_id), false);
Fresco.initialize(this);
Logger.init(TAG) // default PRETTYLOGGER or use just init()
.methodCount(3) // default 2
.hideThreadInfo() // default shown
.logLevel(LogLevel.FULL) // default LogLevel.FULL
.methodOffset(2);
}
示例6: performInit
import com.tencent.bugly.Bugly; //导入依赖的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);
}
示例7: initBugly
import com.tencent.bugly.Bugly; //导入依赖的package包/类
private void initBugly() {
Beta.upgradeCheckPeriod = 60 * 1000 * 60 * 12;
Beta.initDelay = 1000;
Beta.showInterruptedStrategy = true;
Beta.enableHotfix = false;
Bugly.init(getApplicationContext(), "375cce688e", BuildConfig.DEBUG);
}
示例8: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
initDatabase();
// 调试时,将第三个参数改为true
Bugly.init(this,BUGLY_ID,false);
mAppComponent = DaggerAppComponent.builder().appModule(new AppModule(this,Constants.BASE_URL)).build();
NeverCrash.init(new NeverCrash.CrashHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
CrashReport.postCatchedException(e);
}
});
}
示例9: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
AppContext = getApplicationContext();
application = this;
if (!LeakCanary.isInAnalyzerProcess(this)) {
LeakCanary.install(this);
}
Bmob.initialize(this, Constants.BMOB_APPKEY);
try {
StatConfig.init(this);
User currentUser = BmobUser.getCurrentUser(User.class);
if (currentUser != null) {
StatConfig.setCustomUserId(this, currentUser.getUsername());
}
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);
}
示例10: initUpgrade
import com.tencent.bugly.Bugly; //导入依赖的package包/类
private void initUpgrade() {
Beta.autoInit = false;
Beta.autoCheckUpgrade = true;
Beta.upgradeCheckPeriod = 60 * 1000;
Bugly.init(this, BuildConfig.BUGLY_APPID, false);
}
示例11: initBugly
import com.tencent.bugly.Bugly; //导入依赖的package包/类
private void initBugly() {
Beta.autoInit = true;
Beta.autoCheckUpgrade = true;
Beta.showInterruptedStrategy = true;
Beta.initDelay = 8 * 1000;
Beta.canShowUpgradeActs.add(MainActivity.class);
Beta.smallIconId = R.drawable.ic_notification_logo;
Bugly.init(appContext, ConstantValues.BUGLY_ID, BuildConfig.DEBUG);
//CrashReport.testJavaCrash();
}
示例12: init
import com.tencent.bugly.Bugly; //导入依赖的package包/类
public static void init(@NonNull Context context) {
final Context appContext = context.getApplicationContext();
RxJavaUtil.workInRxIoThread(() -> {
CrashReport.UserStrategy userStrategy = new CrashReport.UserStrategy(appContext);
userStrategy.setAppVersion(BuildConfig.VERSION_NAME + "-" + BuildConfig.VERSION_CODE);
Beta.enableHotfix = false;
Bugly.init(appContext, BUGLY_APP_ID, BuildConfig.DEBUG, userStrategy);
});
}
示例13: initBugly
import com.tencent.bugly.Bugly; //导入依赖的package包/类
/**
* 初始化腾讯bugly
*/
private void initBugly() {
Beta.largeIconId = R.mipmap.ic_launcher;
Beta.smallIconId = R.mipmap.ic_launcher;
//设置SD卡中的Download为默认的更新目录
Beta.storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
Bugly.init(getApplicationContext(), "e436df84f4", org.huxizhijian.sdk.util.Utils.isApkDebugable(this));
}
示例14: onCreate
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Bugly.init(getApplicationContext(), "fa7327d922", true);
Bugly.setAppChannel(getApplicationContext(), "public");
// 初始化金山云的Android硬解白名单功能, 此功能需与金山云服务器通信,建议尽早调用
// 若不想使用该功能,请勿调用此接口
KSYHardwareDecodeWhiteList.getInstance().init(this);
}
示例15: init
import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void init() {
if (!BuildConfig.DEBUG) {
Bugly.init(busApplication, BUGLY_APPID, false);
} else {
Bugly.init(busApplication, BUGLY_APPID, true);
}
}