當前位置: 首頁>>代碼示例>>Java>>正文


Java CrashReport.initCrashReport方法代碼示例

本文整理匯總了Java中com.tencent.bugly.crashreport.CrashReport.initCrashReport方法的典型用法代碼示例。如果您正苦於以下問題:Java CrashReport.initCrashReport方法的具體用法?Java CrashReport.initCrashReport怎麽用?Java CrashReport.initCrashReport使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.tencent.bugly.crashreport.CrashReport的用法示例。


在下文中一共展示了CrashReport.initCrashReport方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    OkHttpClient okHttpClient = new OkHttpClient.Builder()
            .build();
    ImagePipelineConfig config = OkHttpImagePipelineConfigFactory.newBuilder(this, okHttpClient)
            .setMainDiskCacheConfig(getDiskCacheConfig())
            .setNetworkFetcher(new OkHttpNetworkFetcher(okHttpClient))
            .setDownsampleEnabled(true)
            .build();
    Fresco.initialize(this, config);

    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));
    CrashReport.initCrashReport(getApplicationContext(), "0a6e92fb70", false, strategy);

    registerActivityLifecycleCallbacks(ActivityLifecycleHelper.build());
}
 
開發者ID:lanyuanxiaoyao,項目名稱:PicKing,代碼行數:22,代碼來源:MyApplication.java

示例2: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //bugly crashreport
    CrashReport.initCrashReport(this, "e1e86d29bc", true);
    //webview debug
    if ((0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE))
            && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        WebView.setWebContentsDebuggingEnabled(true);
    }
    setContentView(R.layout.activity_sample);
    try {
        ApplicationInfo appInfo = getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
        mBingKey = appInfo.metaData.getString("BING_MAP_KEY");
        mClientId = appInfo.metaData.getString("FOURSQUARE_CLIENT_ID");
        mClientSecret = appInfo.metaData.getString("FOURSQUARE_CLIENT_SECRET");
    } catch (PackageManager.NameNotFoundException e) {
    }
    mIvLocation = findViewById(R.id.iv_location);
    mLvPoi = findViewById(R.id.lv_poi);
    mAdapter = new PoiListAdapter();
    mLvPoi.setAdapter(mAdapter);
    mLvPoi.setOnItemClickListener(this);
}
 
開發者ID:bravecheng,項目名稱:BingMapDemo,代碼行數:25,代碼來源:SampleActivity.java

示例3: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
        mAppComponent = DaggerAppComponent
                .builder()
                .appModule(getAppModule())//baseApplication提供
                .clientModule(getClientModule())//baseApplication提供
                .imageModule(getImageModule())//baseApplication提供
                .globeConfigModule(getGlobeConfigModule())//全局配置
                .serviceModule(new ServiceModule())//需自行創建
                .cacheModule(new CacheModule())//需自行創建
                .build();

        if (BuildConfig.LOG_DEBUG) {//Timber日誌打印
            Timber.plant(new Timber.DebugTree());
        }

//        installLeakCanary();//leakCanary內存泄露檢查
        initUMPush();

        //bugly
        CrashReport.initCrashReport(getApplicationContext(), "487e5e6b5d", false);
    }
 
開發者ID:snowwolf10285,項目名稱:PicShow-zhaipin,代碼行數:24,代碼來源:WEApplication.java

示例4: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
        ViewTarget.setTagId(R.id.glide_tag);
        isInstallWx = isWXAppInstalledAndSupported();

        //alibaba
        System.loadLibrary("gnustl_shared");
//        System.loadLibrary("ijkffmpeg");//目前使用微博的ijkffmpeg會出現1K再換wifi不重連的情況
        System.loadLibrary("qupai-media-thirdparty");
//        System.loadLibrary("alivc-media-jni");
        System.loadLibrary("qupai-media-jni");
        ApplicationGlue.initialize(this);

        //Bugly SDK初始化
        CrashReport.initCrashReport(getApplicationContext(), "3080098224", false);
    }
 
開發者ID:JunGeges,項目名稱:AliZhiBoHao,代碼行數:18,代碼來源:MyApplication.java

示例5: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    CrashReport.initCrashReport(getApplicationContext(), "9da27d3d6b", false);
    initOSS();

    //初始化定位
    mLocationClient = new AMapLocationClient(getApplicationContext());
    //設置定位回調監聽
    mLocationClient.setLocationListener(mLocationListener);

    mLocationOption = new AMapLocationClientOption();
    mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
    mLocationOption.setMockEnable(false);
    mLocationClient.setLocationOption(mLocationOption);
    mLocationClient.startLocation();
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:18,代碼來源:initApp.java

示例6: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    CrashReport.initCrashReport(getApplicationContext(), "e1a62089c6", false);
    ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
            .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
            .build();
    Fresco.initialize(this, config);
    SDKInitializer.initialize(this);
    Bmob.initialize(this, "b0cb494256d9b86fc931ca930a055b75");
    Logger.addLogAdapter(new AndroidLogAdapter(){
        @Override
        public boolean isLoggable(int priority, String tag) {
            return true;// TODO: 2017/6/5
        }
    });
    sInstance = this;
    initUser();
}
 
開發者ID:yiwent,項目名稱:Mobike,代碼行數:20,代碼來源:MyApplication.java

示例7: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    // Bugly initial
    CrashReport.initCrashReport(getApplicationContext(), mCrashReportId, false);

    // LeakCanary initial
    LeakCanary.install(this);

    // Realm initial
    Realm.setDefaultConfiguration(new RealmConfiguration.Builder(this)
            .schemaVersion(1)
            .deleteRealmIfMigrationNeeded()
            .build());

    // Gson initial
    initGson();

    // switch day and night mode
    String mode = PrefsUtil.getPrefDayNightMode(this);
    PrefsUtil.switchDayNightMode(mode);
}
 
開發者ID:yansha87,項目名稱:douban-movie,代碼行數:23,代碼來源:MovieApplication.java

示例8: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
        appContext = this;
        //SDK初始化
        IMClient.init(appContext);
//        AVClient.init(this);

        LogFileUtil.isWrite=true;
        CrashReport.initCrashReport(appContext);
        appKeyInit();
        reloginCallBack();
        //agora
        Crasheye.initWithNativeHandle(this, "06798b00");
        //volley
        mRequestQueue = Volley.newRequestQueue(appContext);
        mApi = new ApiTemplate(mRequestQueue, httpConfig.URL);
        initlocation();
    }
 
開發者ID:yun2win,項目名稱:yun2win-sdk-android,代碼行數:20,代碼來源:AppContext.java

示例9: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
//        AVOSCloud.useAVCloudUS();//
        CrashReport.initCrashReport(getApplicationContext(), "900020615", false);
//        CrashReport.testJavaCrash();
        AVOSCloud.initialize(this, "6vNrCi5ou4rw5sb0fx8b0J4w-gzGzoHsz", "zfuBYXx8X235VVi6O7acOM8G");
        AVInstallation.getCurrentInstallation().saveInBackground(new SaveCallback() {
            public void done(AVException e) {
                if (e == null) {
                    // 保存成功
                    String installationId = AVInstallation.getCurrentInstallation().getInstallationId();
                    // 關聯  installationId 到用戶表等操作……
                } else {
                    // 保存失敗,輸出錯誤信息
                }
            }
        });
        PushService.setDefaultPushCallback(this, UpdateActivity.class);
    }
 
開發者ID:JianxunRao,項目名稱:FangYanShuo,代碼行數:21,代碼來源:MyApplication.java

示例10: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    // LeakCanary
    if (LeakCanary.isInAnalyzerProcess(this)) {
        return;
    }
    LeakCanary.install(this);

    instance = this;

    // Bugly
    CrashReport.initCrashReport(getApplicationContext(), "900057697", true);

    SharedPreferences preferences = getSharedPreferences(DAY_NIGHT_MODE, MODE_PRIVATE);
    changeDayNightMode(preferences.getBoolean(NIGHT_MODE, false));

    Realm.init(this);
    Realm.setDefaultConfiguration(new RealmConfiguration.Builder().name(DB_NAME).build());

    getScreenSize();
}
 
開發者ID:Codpoe,項目名稱:GankIo,代碼行數:24,代碼來源:GankIoApplication.java

示例11: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {

  super.onCreate();
  mAppContext = this;
  // 配置Realm數據庫
  RealmConfiguration configuration = new RealmConfiguration
      .Builder(this)
      .deleteRealmIfMigrationNeeded()
      .schemaVersion(6)
      .migration(new RealmMigration() {

        @Override
        public void migrate(DynamicRealm realm, long oldVersion, long newVersion) {

        }
      }).build();

  Realm.setDefaultConfiguration(configuration);

  //配置騰訊bugly
  CrashReport.initCrashReport(getApplicationContext(), ConstantUtil.BUGLY_ID, false);
}
 
開發者ID:HotBitmapGG,項目名稱:MoeQuest,代碼行數:24,代碼來源:MoeQuestApp.java

示例12: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    mAppContext = getApplicationContext();
    CrashHandler.init(new CrashHandler(getApplicationContext()));
    if (!BuildConfig.DEBUG) {
        CrashReport.initCrashReport(getApplicationContext(), "900028220", false);
    }
    //BlockCanary.install(this, new AppBlockCanaryContext()).start();
    //LeakCanary.install(this);

    //RxUtils.unifiedErrorHandler();
    //Thread.setDefaultUncaughtExceptionHandler(new MyUnCaughtExceptionHandler());
    /**
     * 如果存在SD卡則將緩存寫入SD卡,否則寫入手機內存
     */
    if (getApplicationContext().getExternalCacheDir() != null && ExistSDCard()) {
        cacheDir = getApplicationContext().getExternalCacheDir().toString();
    } else {
        cacheDir = getApplicationContext().getCacheDir().toString();
    }
}
 
開發者ID:JasonChow1989,項目名稱:SeeWeather-master,代碼行數:23,代碼來源:BaseApplication.java

示例13: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();
    FlowManager.init(new FlowConfig.Builder(this).build());

    Properties properties = new Properties();
    InputStream stream = null;
    try {
        stream = getAssets().open("conf.properties");
        properties.load(stream);
        CrashReport.initCrashReport(getApplicationContext(), properties.getProperty("bugly.appId"), false);
    } catch (IOException e) {
        Log.w(TAG, e);
    } finally {
        Streams.safeClose(stream);
    }
}
 
開發者ID:YieldNull,項目名稱:Biu,代碼行數:18,代碼來源:MyApplication.java

示例14: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mSettings = getSharedPreferences("prefsname", Context.MODE_PRIVATE); //模式為私有
    autoLogin();//自動登錄
    setContentView(R.layout.activity_main);
    //初始化Bmob SDK數據庫服務
    Bmob.initialize(getApplicationContext(), APPID);
    //初始化bugly服務
    CrashReport.initCrashReport(this, "900010093", false);
    //初始化SMSS短信服務
    SMSSDK.initSDK(this, APPKEY, APPSECRET);
    //用戶數據模型
    initView();


}
 
開發者ID:linkezhi,項目名稱:Android-nRF-Toolbox-master,代碼行數:18,代碼來源:MainActivity.java

示例15: onCreate

import com.tencent.bugly.crashreport.CrashReport; //導入方法依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
        con = this;
//        if (LeakCanary.isInAnalyzerProcess(this)) {
//            // This process is dedicated to LeakCanary for heap analysis.
//            // You should not init your app in this process.
//            return;
//        }
//        LeakCanary.install(this);
        // Normal app init code...
        CrashReport.initCrashReport(getApplicationContext(), "cfccfa2c50", false);
    }
 
開發者ID:w568w,項目名稱:fuckView,代碼行數:14,代碼來源:MyApplication.java


注:本文中的com.tencent.bugly.crashreport.CrashReport.initCrashReport方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。