当前位置: 首页>>代码示例>>Java>>正文


Java Bugly类代码示例

本文整理汇总了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();
    }
 
开发者ID:htqqdd,项目名称:music_player,代码行数:18,代码来源:MyApplication.java

示例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);

    }
 
开发者ID:ThirtyDegreesRay,项目名称:OpenHub,代码行数:17,代码来源:AppApplication.java

示例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();
}
 
开发者ID:KoreHuang,项目名称:WeChatLuckyMoney,代码行数:19,代码来源:MainActivity.java

示例4: onCreate

import com.tencent.bugly.Bugly; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    sInstance = this;

    Bugly.init(getApplicationContext(), "6ace1b5b58", false);
}
 
开发者ID:mzlogin,项目名称:guanggoo-android,代码行数:9,代码来源:App.java

示例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);
}
 
开发者ID:HStanN,项目名称:TakeRest,代码行数:13,代码来源:GoApp.java

示例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);
    }
 
开发者ID:NICOLITE,项目名称:HutHelper,代码行数:33,代码来源:InitializeService.java

示例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);
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:8,代码来源:GravityBoxApplication.java

示例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);
        }
    });
}
 
开发者ID:jenly1314,项目名称:KingTV,代码行数:16,代码来源:App.java

示例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);
}
 
开发者ID:NICOLITE,项目名称:Palm300Heroes,代码行数:34,代码来源:MApplication.java

示例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);
}
 
开发者ID:yeungeek,项目名称:monkey-android,代码行数:8,代码来源:MonkeyApplication.java

示例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();
}
 
开发者ID:WangGanxin,项目名称:DoingDaily,代码行数:11,代码来源:DoingDailyMainInit.java

示例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);
    });
}
 
开发者ID:ykrank,项目名称:S1-Next,代码行数:11,代码来源:BuglyUtils.java

示例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));
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:11,代码来源:HHApplication.java

示例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);
}
 
开发者ID:ksvc,项目名称:KSYMediaPlayer_Android,代码行数:12,代码来源:PlayerApplication.java

示例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);
    }
}
 
开发者ID:lowwor,项目名称:Realtime-Bus,代码行数:9,代码来源:BugReportProxyImpl.java


注:本文中的com.tencent.bugly.Bugly类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。