当前位置: 首页>>代码示例>>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;未经允许,请勿转载。