Search in sources :

Example 1 with FirebaseCrashlytics

use of com.google.firebase.crashlytics.FirebaseCrashlytics in project sexytopo by richsmith.

the class SexyTopo method handleUncaughtException.

public void handleUncaughtException(Thread thread, Throwable e) {
    Log.setContext(this);
    FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
    crashlytics.recordException(e);
    Log.e(e);
    defaultHandler.uncaughtException(thread, e);
}
Also used : FirebaseCrashlytics(com.google.firebase.crashlytics.FirebaseCrashlytics)

Example 2 with FirebaseCrashlytics

use of com.google.firebase.crashlytics.FirebaseCrashlytics in project sexytopo by richsmith.

the class NewStationNotificationService method onStartCommand.

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    BroadcastReceiver receiver = new BroadcastReceiver() {

        @Override
        public void onReceive(Context context, Intent intent) {
            update();
        }
    };
    try {
        LocalBroadcastManager broadcastManager = LocalBroadcastManager.getInstance(this);
        broadcastManager.registerReceiver(receiver, new IntentFilter(SexyTopo.NEW_STATION_CREATED_EVENT));
    } catch (Exception exception) {
        FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
        crashlytics.recordException(exception);
        Log.e(exception);
    }
    return START_REDELIVER_INTENT;
}
Also used : Context(android.content.Context) IntentFilter(android.content.IntentFilter) Intent(android.content.Intent) BroadcastReceiver(android.content.BroadcastReceiver) LocalBroadcastManager(androidx.localbroadcastmanager.content.LocalBroadcastManager) FirebaseCrashlytics(com.google.firebase.crashlytics.FirebaseCrashlytics)

Aggregations

FirebaseCrashlytics (com.google.firebase.crashlytics.FirebaseCrashlytics)2 BroadcastReceiver (android.content.BroadcastReceiver)1 Context (android.content.Context)1 Intent (android.content.Intent)1 IntentFilter (android.content.IntentFilter)1 LocalBroadcastManager (androidx.localbroadcastmanager.content.LocalBroadcastManager)1