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


Java Bugly.setIsDevelopmentDevice方法代码示例

本文整理汇总了Java中com.tencent.bugly.Bugly.setIsDevelopmentDevice方法的典型用法代码示例。如果您正苦于以下问题:Java Bugly.setIsDevelopmentDevice方法的具体用法?Java Bugly.setIsDevelopmentDevice怎么用?Java Bugly.setIsDevelopmentDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.tencent.bugly.Bugly的用法示例。


在下文中一共展示了Bugly.setIsDevelopmentDevice方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: onCreate

import com.tencent.bugly.Bugly; //导入方法依赖的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);
}
 
开发者ID:NICOLITE,项目名称:HutHelper,代码行数:43,代码来源:MApplication.java

示例3: configTinker

import com.tencent.bugly.Bugly; //导入方法依赖的package包/类
private void configTinker() {
    // 设置是否开启热更新能力,默认为true
    Beta.enableHotfix = true;
    // 设置是否自动下载补丁,默认为true
    Beta.canAutoDownloadPatch = true;
    // 设置是否自动合成补丁,默认为true
    Beta.canAutoPatch = true;
    // 设置是否提示用户重启,默认为false
    Beta.canNotifyUserRestart = true;
    // 补丁回调接口
    Beta.betaPatchListener = new BetaPatchListener() {
        @Override
        public void onPatchReceived(String patchFile) {
            Toast.makeText(mContext, "补丁下载地址" + patchFile, Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onDownloadReceived(long savedLength, long totalLength) {
            Toast.makeText(mContext,
                    String.format(Locale.getDefault(), "%s %d%%",
                            Beta.strNotificationDownloading,
                            (int) (totalLength == 0 ? 0 : savedLength * 100 / totalLength)),
                    Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onDownloadSuccess(String msg) {
            Toast.makeText(mContext, "补丁下载成功", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onDownloadFailure(String msg) {
            Toast.makeText(mContext, "补丁下载失败", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onApplySuccess(String msg) {
            Toast.makeText(mContext, "补丁应用成功", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onApplyFailure(String msg) {
            Toast.makeText(mContext, "补丁应用失败", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onPatchRollback() {

        }
    };

    // 设置开发设备,默认为false,上传补丁如果下发范围指定为“开发设备”,需要调用此接口来标识开发设备
    Bugly.setIsDevelopmentDevice(mContext, false);
    // 多渠道需求塞入
    // String channel = WalleChannelReader.getChannel(getApplication());
    // Bugly.setAppChannel(getApplication(), channel);
    // 这里实现SDK初始化,appId替换成你的在Bugly平台申请的appId
    Bugly.init(mContext, "3062edb401", true);
}
 
开发者ID:GitLqr,项目名称:HotFixDemo,代码行数:60,代码来源:SampleApplicationLike.java

示例4: onCreate

import com.tencent.bugly.Bugly; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    // 设置是否开启热更新能力,默认为true
    Beta.enableHotfix = true;
    // 设置是否自动下载补丁,默认为true
    Beta.canAutoDownloadPatch = true;
    // 设置是否自动合成补丁,默认为true
    Beta.canAutoPatch = true;
    // 设置是否提示用户重启,默认为false
    Beta.canNotifyUserRestart = true;
    // 补丁回调接口
    Beta.betaPatchListener = new BetaPatchListener() {
        @Override
        public void onPatchReceived(String patchFile) {
            Toast.makeText(getApplication(), "补丁下载地址" + patchFile, Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onDownloadReceived(long savedLength, long totalLength) {
            Toast.makeText(getApplication(),
                    String.format(Locale.getDefault(), "%s %d%%",
                            Beta.strNotificationDownloading,
                            (int) (totalLength == 0 ? 0 : savedLength * 100 / totalLength)),
                    Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onDownloadSuccess(String msg) {
            Toast.makeText(getApplication(), "补丁下载成功", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onDownloadFailure(String msg) {
            Toast.makeText(getApplication(), "补丁下载失败", Toast.LENGTH_SHORT).show();

        }

        @Override
        public void onApplySuccess(String msg) {
            Toast.makeText(getApplication(), "补丁应用成功", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onApplyFailure(String msg) {
            Toast.makeText(getApplication(), "补丁应用失败", Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onPatchRollback() {

        }
    };

    // 设置开发设备,默认为false,上传补丁如果下发范围指定为“开发设备”,需要调用此接口来标识开发设备
    Bugly.setIsDevelopmentDevice(getApplication(), true);
    // 多渠道需求塞入
    // String channel = WalleChannelReader.getChannel(getApplication());
    // Bugly.setAppChannel(getApplication(), channel);
    // 这里实现SDK初始化,appId替换成你的在Bugly平台申请的appId
    Bugly.init(getApplication(), "900029763", true);
}
 
开发者ID:BuglyDevTeam,项目名称:Bugly-Android-Demo,代码行数:63,代码来源:SampleApplicationLike.java


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