com.crashlytics.android.core.CrashlyticsCore Java Examples
The following examples show how to use
com.crashlytics.android.core.CrashlyticsCore.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: G.java From iGap-Android with GNU Affero General Public License v3.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); G.firstTimeEnterToApp = true; new Thread(new Runnable() { @Override public void run() { Fabric.with(getApplicationContext(), new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build()); CaocConfig.Builder.create().backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT).showErrorDetails(false).showRestartButton(true).trackActivities(true).restartActivity(ActivityMain.class).errorActivity(ActivityCustomError.class).apply(); } }).start(); context = getApplicationContext(); handler = new Handler(); inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); Raad.init(getApplicationContext()); Utils.setInstart(context, "fa"); WebBase.apiKey = "5aa7e856ae7fbc00016ac5a01c65909797d94a16a279f46a4abb5faa"; new StartupActions(); }
Example #2
Source File: FontProviderApplication.java From FontProvider with MIT License | 6 votes |
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); }
Example #3
Source File: Crashlytics.java From letv with Apache License 2.0 | 6 votes |
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); }
Example #4
Source File: Application.java From android-mvp-starter with MIT License | 6 votes |
@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()); } }
Example #5
Source File: SetupApplication.java From octoandroid with GNU General Public License v3.0 | 5 votes |
/** * The Crashlytics build method creates an Answers instance which currently * cannot be disabled. So must wrap in if statement * to check if build config so it doesn't get created. * All methods of Answers.getInstance must be wrapped in null checks * or build config checks unfortunately. */ private void initializeCrashlytics() { if (!BuildConfig.DEBUG) { CrashlyticsCore core = new CrashlyticsCore.Builder() .disabled(BuildConfig.DEBUG) .build(); Fabric.with(this, new Crashlytics.Builder().core(core).build()); } }
Example #6
Source File: Aptoide.java From aptoide-client with GNU General Public License v2.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); Analytics.Lifecycle.Application.onCreate(this); setAdvertisingIdClient(); context = this; db = SQLiteDatabaseHelper.getInstance(this).getReadableDatabase(); filters = AptoideUtils.HWSpecifications.filters(this); ManagerPreferences.getInstance(this) //inits the ManagerPreferences .preferences .registerOnSharedPreferenceChangeListener( listener = new SharedPreferences.OnSharedPreferenceChangeListener() { @Override public void onSharedPreferenceChanged( final SharedPreferences sharedPreferences, final String key) { if (TextUtils.equals(key, "hwspecsChkBox")) { filters = AptoideUtils.HWSpecifications.filters(Aptoide.this); } } }); Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(!BuildConfig.FABRIC_CONFIGURED).build()) .build(); Fabric.with(this, crashlyticsKit); setConfiguration(getAptoideConfiguration()); initImageLoader(); setDebugMode(); checkIsSystem(); setThemePicker(getNewThemePicker()); Crashlytics.setString("Language", getResources().getConfiguration().locale.getLanguage()); AptoideUtils.CrashlyticsUtils.subsctibeActivityLiveCycleEvent(); }
Example #7
Source File: xdrip.java From xDrip with GNU General Public License v3.0 | 5 votes |
public synchronized static void initCrashlytics(Context context) { if ((!fabricInited && isWear2OrAbove() && !isRunningTest())) { try { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(context, crashlyticsKit); } catch (Exception e) { Log.e(TAG, e.toString()); } fabricInited = true; } }
Example #8
Source File: xdrip.java From xDrip with GNU General Public License v3.0 | 5 votes |
public synchronized static void initCrashlytics(Context context) { if ((!fabricInited) && !isRunningTest()) { try { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(context, crashlyticsKit); } catch (Exception e) { Log.e(TAG, e.toString()); } fabricInited = true; } }
Example #9
Source File: xdrip.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public synchronized static void initCrashlytics(Context context) { if ((!fabricInited && isWear2OrAbove() && !isRunningTest())) { try { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(context, crashlyticsKit); } catch (Exception e) { Log.e(TAG, e.toString()); } fabricInited = true; } }
Example #10
Source File: xdrip.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public synchronized static void initCrashlytics(Context context) { if ((!fabricInited) && !isRunningTest()) { try { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(context, crashlyticsKit); } catch (Exception e) { Log.e(TAG, e.toString()); } fabricInited = true; } }
Example #11
Source File: StartFunction.java From ANE-Crashlytics with Apache License 2.0 | 5 votes |
public FREObject call(FREContext context, FREObject[] args) { super.call(context, args); final FREContext cont = context; final CrashlyticsListener crashlyticsListener = new CrashlyticsListener() { @Override public void crashlyticsDidDetectCrashDuringPreviousExecution(){ cont.dispatchStatusEventAsync(Constants.AirCrashlyticsEvent_CRASH_DETECTED_DURING_PREVIOUS_EXECUTION, "No crash data"); } }; boolean debugMode = getBooleanFromFREObject(args[0]); final CrashlyticsCore crashlyticsCore = new CrashlyticsCore .Builder() .listener(crashlyticsListener) .build(); final Crashlytics crashlytics = new Crashlytics.Builder().core(crashlyticsCore).build(); final Fabric fabric = new Fabric.Builder(context.getActivity().getApplicationContext()) .kits(crashlytics) .debuggable(debugMode) .build(); Fabric.with(fabric); return null; }
Example #12
Source File: App.java From Hews with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); // Fabric.with(this, new Crashlytics()); // disable Crashlytics while debugging CrashlyticsCore core = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build(); Fabric.with(this, new Crashlytics.Builder().core(core).build()); }
Example #13
Source File: SilentApplication.java From KUAS-AP-Material with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build()); FirebaseApp.initializeApp(this); initImageLoader(getApplicationContext()); }
Example #14
Source File: SilentApplication.java From KUAS-AP-Material with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build()); initImageLoader(getApplicationContext()); }
Example #15
Source File: MainActivity.java From Jager with GNU General Public License v3.0 | 5 votes |
private void initFabric () { if (sendCrashData ()) { Crashlytics crashlyticsKit = new Crashlytics.Builder () .core (new CrashlyticsCore.Builder ().disabled (BuildConfig.DEBUG).build ()) .build (); Fabric.with (this, crashlyticsKit); } }
Example #16
Source File: App.java From q-municate-android with Apache License 2.0 | 5 votes |
private void initFabric() { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(this, crashlyticsKit); }
Example #17
Source File: CoreApp.java From Android-Application with GNU General Public License v3.0 | 5 votes |
@Override public void onCreate() { super.onCreate(); mDefaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(mCaughtExceptionHandler); //handle CameraView crash and still report to crashlytics CrashlyticsCore core = new CrashlyticsCore.Builder() //.disabled(BuildConfig.DEBUG) .build(); Fabric.with(new Fabric.Builder(this).kits(new Crashlytics.Builder() .core(core) .build()) .initializationCallback(new InitializationCallback<Fabric>() { @Override public void success(Fabric fabric) { //Thread.setDefaultUncaughtExceptionHandler(mCaughtExceptionHandler); if(mDefaultUEH != Thread.getDefaultUncaughtExceptionHandler()){ mDefaultUEH = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler(mCaughtExceptionHandler); } } @Override public void failure(Exception e) { } }) .build()); }
Example #18
Source File: App.java From Orin with GNU General Public License v3.0 | 5 votes |
@Override 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(); Fabric.with(this, crashlyticsKit); // Set up dynamic shortcuts if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { new DynamicShortcutManager(this).initDynamicShortcuts(); } }
Example #19
Source File: AnalyticsService.java From nano-wallet-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Start analytics services */ public void start() { // initialize crashlytics Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore()) .answers(new Answers()) .build(); Fabric.with(context, crashlyticsKit); }
Example #20
Source File: FFMApplication.java From FCM-for-Mojo with GNU General Public License v3.0 | 5 votes |
private static void initCrashReport(Context context) { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(context, crashlyticsKit); }
Example #21
Source File: AnalyticsService.java From nano-wallet-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Start analytics services */ public void startAnswersOnly() { // initialize crashlytics Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(true).build()) .answers(new Answers()) .build(); Fabric.with(context, crashlyticsKit); }
Example #22
Source File: AnalyticsService.java From nano-wallet-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Stop analytics services */ public void stop() { // disable crashlytics Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(true).build()) .build(); Fabric.with(context, crashlyticsKit); }
Example #23
Source File: App.java From Resume-Builder with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); 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()); } Timber.plant(new CrashlyticsTree()); }
Example #24
Source File: Crashlytics.java From letv with Apache License 2.0 | 4 votes |
Crashlytics(Answers answers, Beta beta, CrashlyticsCore core) { this.answers = answers; this.beta = beta; this.core = core; this.kits = Collections.unmodifiableCollection(Arrays.asList(new Kit[]{answers, beta, core})); }
Example #25
Source File: GuardaApp.java From guarda-android-wallets with GNU General Public License v3.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); context = this; context_s = this; appComponent = buildAppComponent(); registerActivityLifecycleCallbacks(this); sharedManager = new SharedManager(); String packageName = getApplicationContext().getPackageName(); Log.d("flint", "GuardaApp.onCreate()... packageName: " + packageName); if ("com.guarda.dct".equals(packageName)) { // buy - это покупка, purchase - обменник // SharedManager.flag_disable_buy_menu = true; // SharedManager.flag_disable_purchase_menu = true; SharedManager.flag_create_new_wallet_screen = true; } else if ("com.guarda.etc".equals(packageName)) { SharedManager.flag_etc_eth_private_key_showing_fix = true; } else if ("com.guarda.ethereum".equals(packageName)) { SharedManager.flag_etc_eth_private_key_showing_fix = true; } else if ("com.guarda.clo".equals(packageName)) { SharedManager.flag_etc_eth_private_key_showing_fix = true; } else if ("com.guarda.bts".equals(packageName)) { SharedManager.flag_create_new_wallet_screen = true; } // [initially both are disabled. check and enable function is placed in CurrencyListHolder.castResponseCurrencyToCryptoItem] SharedManager.flag_disable_buy_menu = false; // !!! since we have 3 exchange services, make buy menu initially enabled //SharedManager.flag_disable_purchase_menu = true; SharedManager.flag_disable_purchase_menu = false; // !!! since we have two exchange services, changelly's check for exchange activity was disabled if ("com.guarda.clo".equals(packageName)) { SharedManager.flag_disable_buy_menu = true; } try { ///////////////// // chinese crutch: force java lazy initialization of SecurePreferences, it's needed for old versions of android SecurePreferences.setValue("chinese_crutch_key", "chinese_crutch_value"); SecurePreferences.setValue("chinese_crutch_key", ""); // chinese crutch ///////////////// } catch (Exception e) { Log.d("psd", "SecurePreferences doesn't support or something else - " + e.getMessage()); e.printStackTrace(); //for devices that are not support SecurePreferences sharedManager.setIsSecureStorageSupported(false); } if ("com.guarda.btc".equals(packageName) || "com.guarda.bch".equals(packageName) || "com.guarda.btg".equals(packageName) || "com.guarda.ltc".equals(packageName) || "com.guarda.sbtc".equals(packageName) || "com.guarda.dgb".equals(packageName) || "com.guarda.kmd".equals(packageName) || "com.guarda.bts".equals(packageName) || "com.guarda.qtum".equals(packageName)) { sharedManager.setHasWifXprvKeys(true); } ShapeshiftManager.getInstance().updateSupportedCoinsList(null); FreshchatConfig freshchatConfig = new FreshchatConfig(Const.FRESHCHAT_APP_ID, Const.FRESHCHAT_APP_KEY); freshchatConfig.setGallerySelectionEnabled(true); Freshchat.getInstance(getApplicationContext()).init(freshchatConfig); Map<String, String> userMeta = new HashMap<>(); userMeta.put("packageName", packageName); userMeta.put("platform", "android"); Freshchat.getInstance(getApplicationContext()).setUserProperties(userMeta); FirebaseCrash.setCrashCollectionEnabled(!BuildConfig.DEBUG); // 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); }
Example #26
Source File: SplashActivity.java From alpha-wallet-android with MIT License | 4 votes |
@Override protected void onCreate(Bundle savedInstanceState) { AndroidInjection.inject(this); setContentView(R.layout.activity_splash); super.onCreate(savedInstanceState); if (!BuildConfig.DEBUG) { CrashlyticsCore core = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build(); Fabric.with(this, new Crashlytics.Builder().core(core).build()); } LocaleUtils.setDeviceLocale(getBaseContext()); // Get the intent that started this activity Intent intent = getIntent(); Uri data = intent.getData(); ImportTokenActivity importTokenActivity = new ImportTokenActivity(); if (data != null) { importData = data.toString(); if (importData.startsWith("content://")) { importPath = data.getPath(); } } else { //try the clipboard importData = importTokenActivity.getMagiclinkFromClipboard(this); } splashViewModel = ViewModelProviders.of(this, splashViewModelFactory) .get(SplashViewModel.class); splashViewModel.wallets().observe(this, this::onWallets); splashViewModel.createWallet().observe(this, this::onWalletCreate); splashViewModel.setLocale(getApplicationContext()); splashViewModel.setCurrency(); long getAppUpdateTime = getAppLastUpdateTime(); splashViewModel.fetchWallets(); splashViewModel.checkVersionUpdate(getBaseContext(), getAppUpdateTime); }
Example #27
Source File: FlutterCrashlyticsPlugin.java From flutter_crashlytics with BSD 2-Clause "Simplified" License | 4 votes |
void onInitialisedMethodCall(MethodCall call, MethodChannel.Result result) { final CrashlyticsCore core = Crashlytics.getInstance().core; switch (call.method) { case "log": if (call.arguments instanceof String) { core.log(call.arguments.toString()); } else { try { final List<Object> info = (List<Object>) call.arguments; core.log(parseStringOrEmpty(info.get(0)) + ": " + info.get(1) + " " + info.get(2)); } catch (ClassCastException ex) { Log.d("FlutterCrashlytics", "" + ex.getMessage()); } } result.success(null); break; case "setInfo": final Object currentInfo = call.argument("value"); if (currentInfo instanceof String) { core.setString((String) call.argument("key"), (String) call.argument("value")); } else if (currentInfo instanceof Integer) { core.setInt((String) call.argument("key"), (Integer) call.argument("value")); } else if (currentInfo instanceof Double) { core.setDouble((String) call.argument("key"), (Double) call.argument("value")); } else if (currentInfo instanceof Boolean) { core.setBool((String) call.argument("key"), (Boolean) call.argument("value")); } else if (currentInfo instanceof Float) { core.setFloat((String) call.argument("key"), (Float) call.argument("value")); } else if (currentInfo instanceof Long) { core.setLong((String) call.argument("key"), (Long) call.argument("value")); } else { core.log("ignoring unknown type with key " + call.argument("key") + "and value " + call.argument("value")); } result.success(null); break; case "setUserInfo": core.setUserEmail((String) call.argument("email")); core.setUserName((String) call.argument("name")); core.setUserIdentifier((String) call.argument("id")); result.success(null); break; case "reportCrash": final Map<String, Object> exception = (Map<String, Object>) call.arguments; final boolean forceCrash = tryParseForceCrash(exception.get("forceCrash")); final FlutterException throwable = Utils.create(exception); if (forceCrash) { //Start a new activity to not crash directly under onMethod call, or it will crash JNI instead of a clean exception final Intent intent = new Intent(context, CrashActivity.class); intent.putExtra("exception", throwable); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } else { Log.d("Crashlytics", "this thing is reporting"); core.logException(throwable); } result.success(null); break; default: result.notImplemented(); break; } }
Example #28
Source File: CrashlyticsWrapper.java From matlog with GNU General Public License v3.0 | 4 votes |
public static void initCrashlytics(Context context) { Crashlytics crashlyticsKit = new Crashlytics.Builder() .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) .build(); Fabric.with(context, crashlyticsKit); }
Example #29
Source File: BaseApp.java From go-bees with GNU General Public License v3.0 | 4 votes |
protected void initCrashlytics() { // Set up Crashlytics, disabled for mock builds Fabric.with(this, new Crashlytics.Builder().core(new CrashlyticsCore.Builder() .disabled(isMock()).build()) .build()); }
Example #30
Source File: CrashReportApplication.java From text_converter with GNU General Public License v3.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); CrashlyticsCore core = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build(); Fabric.with(this, new Crashlytics.Builder().core(core).build()); }