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


Java CrashlyticsCore類代碼示例

本文整理匯總了Java中com.crashlytics.android.core.CrashlyticsCore的典型用法代碼示例。如果您正苦於以下問題:Java CrashlyticsCore類的具體用法?Java CrashlyticsCore怎麽用?Java CrashlyticsCore使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: build

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
public Crashlytics build() {
    if (this.coreBuilder != null) {
        if (this.core != null) {
            throw new IllegalStateException("Must not use Deprecated methods delay(), disabled(), listener(), pinningInfoProvider() with core()");
        }
        this.core = this.coreBuilder.build();
    }
    if (this.answers == null) {
        this.answers = new Answers();
    }
    if (this.beta == null) {
        this.beta = new Beta();
    }
    if (this.core == null) {
        this.core = new CrashlyticsCore();
    }
    return new Crashlytics(this.answers, this.beta, this.core);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:19,代碼來源:Crashlytics.java

示例2: init

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
public static void init(Context context) {
    if (sInitialized) {
        return;
    }

    sInitialized = true;

    Crashlytics crashlyticsKit = new Crashlytics.Builder()
            .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
            .build();

    Fabric.with(context, crashlyticsKit);

    FontProviderSettings.init(context);
    FontManager.init(context);
}
 
開發者ID:RikkaApps,項目名稱:FontProvider,代碼行數:17,代碼來源:FontProviderApplication.java

示例3: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
    public void onCreate() {
        super.onCreate();
        //Fabric.with(this, new Crashlytics());
// Set up Crashlytics, disabled for debug builds
        Crashlytics crashlyticsKit = new Crashlytics.Builder()
                .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
                .build();

// Initialize Fabric with the debug-disabled crashlytics.
        Fabric.with(this, crashlyticsKit);
        // Required initialization logic here!
        mConnectivityChangesDetector = new ConnectivityChangesDetector();
        mIntentFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
        registerReceiver(mConnectivityChangesDetector,mIntentFilter);
    }
 
開發者ID:frank240889,項目名稱:AutoMusicTagFixer,代碼行數:17,代碼來源:AutoMusicTagFixer.java

示例4: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    Stetho.initializeWithDefaults(this);

    CrashlyticsCore core = new CrashlyticsCore.Builder()
            .disabled(BuildConfig.DEBUG)
            .build();
    Fabric.with(this, new Crashlytics.Builder().core(core).build(), new Crashlytics());

    // ...

    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }
    Timber.plant(new CrashlyticsTree());

    MainApp.init(getBaseContext());
}
 
開發者ID:erlymon,項目名稱:erlymon-monitor-android,代碼行數:21,代碼來源:MainApp.java

示例5: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState, int layoutId) {
    super.onCreate(savedInstanceState, layoutId);
    if(Fabric.isInitialized())
        CrashlyticsCore.getInstance().log(getClass().getName() + " onCreate");

    if(!VersionUtils.isUsingCorrectBuild()) {
        new AlertDialog.Builder(this)
                .setMessage(pct.droid.base.R.string.wrong_abi)
                .setCancelable(false)
                .show();

        PopcornUpdater.getInstance(this, new PopcornUpdater.Listener() {
            @Override
            public void updateAvailable(String updateFile) {
                Intent installIntent = new Intent(Intent.ACTION_VIEW);
                installIntent.setDataAndType(Uri.parse("file://" + updateFile), PopcornUpdater.ANDROID_PACKAGE);
                installIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(installIntent);
            }
        }).checkUpdatesManually();
    }
}
 
開發者ID:PTCE,項目名稱:popcorn-android,代碼行數:24,代碼來源:PopcornBaseActivity.java

示例6: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    // Context
    MiitaContext.onCreateApplication(getApplicationContext());

    // Fabric
    final Crashlytics crashlytics = new Crashlytics.Builder()
            .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
            .build();
    Fabric.with(this, crashlytics);

    // Realm
    RealmConfiguration config = new RealmConfiguration.Builder(this).build();
    Realm.setDefaultConfiguration(config);
}
 
開發者ID:naoto0822,項目名稱:miita-android,代碼行數:18,代碼來源:MiitaApplication.java

示例7: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
public  void onCreate(){
    super.onCreate();

    //di
    component = DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this)).build();

     //Crashlytics
    CrashlyticsCore core = new CrashlyticsCore.Builder()
            .disabled(BuildConfig.DEBUG)
            .build();

    Fabric.with(this, new Crashlytics.Builder().core(core).build());

    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    } else {
        Timber.plant(new CrashReportTree());
    }
}
 
開發者ID:dtunctuncer,項目名稱:android-mvp-starter,代碼行數:21,代碼來源:Application.java

示例8: initFabric

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
private void initFabric(Context context) {
    if (!BuildConfig.BUILD_TYPE.equalsIgnoreCase("debug")) {
        //Timber.plant(new CrashlyticsLogExceptionTree());
        Timber.plant(new CrashlyticsLogTree(Log.INFO));
    }

    Crashlytics crashlyticsKit = new Crashlytics.Builder().core(
            new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG && !BuildConfig.BUILD_TYPE.equals("staging"))
                                         .build())
                                                          .build();

    Fabric fabric = new Fabric.Builder(context).kits(crashlyticsKit)
                                               .debuggable(BuildConfig.DEBUG)
                                               .build();


    Fabric.with(fabric);
    Crashlytics.setUserIdentifier(Installation.id(context));
}
 
開發者ID:die-tageszeitung,項目名稱:tazapp-android,代碼行數:20,代碼來源:AnalyticsWrapper.java

示例9: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    long curTime = System.currentTimeMillis();
    Fabric.with(this, new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build(), new Crashlytics());
    setContentView(R.layout.activity_main);
    PermissionInfo permissionInfo = new PermissionInfo();
    permissionInfo.getPermissions(this, new ResultCallback<Boolean>() {
        @Override
        public void onResult(Boolean result) {
            isPermission=result;
            if (result) {
                if(getIntent().getBooleanExtra("PERMISSION", false)) finish();
                else
                load();
            }
            else finish();
        }
    });
    if (getSupportActionBar() != null)
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
 
開發者ID:MD2Korg,項目名稱:mCerebrum-DataKit,代碼行數:23,代碼來源:ActivityMain.java

示例10: log

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
protected void log(int priority, String tag, String message, Throwable t) {
    if (priority == Log.VERBOSE || priority == Log.DEBUG) {
        return;
    }

    CrashlyticsCore.getInstance().log(priority, tag, message);

    if (t != null) {
        if (priority == Log.ERROR) {
            CrashlyticsCore.getInstance().logException(t);
        } else if (priority == Log.WARN) {
            CrashlyticsCore.getInstance().log(t.getMessage());
        }
    }
}
 
開發者ID:sregg,項目名稱:spotify-tv,代碼行數:17,代碼來源:SpotifyTvApplication.java

示例11: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
public void onCreate() {
    super.onCreate();

    httpClient =  new OkHttpClient.Builder().build();

    Crashlytics crashlytics = new Crashlytics.Builder()
            .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
            .build();
    final Fabric fabric = new Fabric.Builder(this)
            .kits(crashlytics, new Answers())
            .debuggable(BuildConfig.DEBUG)
            .build();
    Fabric.with(fabric);

    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    } else {
        Timber.plant(new CrashlyticsTree());
        FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(true);
    }
    NightModeUtil.update(this);

    // set user agent to prevent getting banned from the osm servers
    Configuration.getInstance().load(this, PreferenceManager.getDefaultSharedPreferences(this));
}
 
開發者ID:alvinhkh,項目名稱:buseta,代碼行數:27,代碼來源:App.java

示例12: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
public void onCreate() {
    super.onCreate();

    // Set up Crashlytics, disabled for debug builds
    Crashlytics crashlyticsKit = new Crashlytics.Builder()
            .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
            .build();
    // Initialize Fabric with the debug-disabled crashlytics.
    Fabric.with(this, crashlyticsKit);

    PreferenceManager.setDefaultValues(getApplicationContext(), R.xml.preference_screen, false);

    TranSappApplication.context = getApplicationContext();
    Installation.loadUserId(context);
    PositionProvider.instantiate(getApplicationContext());
}
 
開發者ID:InspectorIncognito,項目名稱:androidApp,代碼行數:17,代碼來源:TranSappApplication.java

示例13: onCreate

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Set up Crashlytics, disabled for debug builds
    Crashlytics crashlyticsKit = new Crashlytics.Builder()
            .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
            .build();

    // Initialize Fabric with the debug-disabled crashlytics.
    Fabric.with(this, crashlyticsKit, new Crashlytics());

    setContentView(R.layout.activity_thought_shakeup);
    PermissionInfo permissionInfo = new PermissionInfo();
    permissionInfo.getPermissions(this, new ResultCallback<Boolean>() {
        @Override
        public void onResult(Boolean result) {
            isPermission = result;
            if (result)
                load();
            else finish();
        }
    });
}
 
開發者ID:MD2Korg,項目名稱:mCerebrum-ThoughtShakeup,代碼行數:25,代碼來源:ActivityThoughtShakeup.java

示例14: getEnum

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public <T extends Enum<?>> T getEnum(AppSetting setting)
{
    Enum defEnum = (Enum) setting.getDefault();

    String name = getStringByKey(setting.getKey());

    if (name == null)
        return (T) defEnum;

    try
    {
        return (T) Enum.valueOf(defEnum.getClass(), name);
    }
    catch (IllegalArgumentException e)
    {
        CrashlyticsCore.getInstance().logException(e);
        return (T) defEnum;
    }
}
 
開發者ID:matejdro,項目名稱:PebbleNotificationCenter-Android,代碼行數:22,代碼來源:AbsAppSettingStorage.java

示例15: CrashReports

import com.crashlytics.android.core.CrashlyticsCore; //導入依賴的package包/類
/**
 * init crash reports
 *
 * @param context activity context
 */
public CrashReports(Context context) {
  Crashlytics crashlyticsKit = new Crashlytics.Builder().core(
      new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG)
          .build())
      .build();
  Fabric.with(context, crashlyticsKit);
}
 
開發者ID:dfloureiro,項目名稱:opentrivia,代碼行數:13,代碼來源:CrashReports.java


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