Android

Android TutorialAdding a FuseView to an Android ProjectAndroid 9-Patch ImagesAndroid Accessing SQLite databases using the ContentValues classAndroid Accounts and AccountManagerAndroid ACRAAndroid ActivityAndroid Activity RecognitionAndroid adb (Android Debug Bridge)Android adb shellAndroid AdMobAndroid AIDLAndroid AlarmManagerAndroid Android-x86 in VirtualBoxAndroid Animated AlertDialog BoxAndroid AnimatorsAndroid Annotation ProcessorAndroid Architecture ComponentsAndroid AsyncTaskAndroid AudioManagerAndroid AudioTrackAndroid AuthenticatorAndroid AutoCompleteTextViewAndroid Autosizing TextViewsAndroid Barcode and QR code readingAndroid Bitmap CacheAndroid Bluetooth and Bluetooth LE APIAndroid Bluetooth Low EnergyAndroid Bottom SheetsAndroid BottomNavigationViewAndroid BroadcastReceiverAndroid Building Backwards Compatible AppsAndroid ButterKnifeAndroid ButtonAndroid Callback URLAndroid Camera 2 APIAndroid Camera and GalleryAndroid Canvas drawing using SurfaceViewAndroid Capturing ScreenshotsAndroid CardViewAndroid Check Data ConnectionAndroid Check Internet ConnectivityAndroid CleverTapAndroid ColorsAndroid ConstraintLayoutAndroid ConstraintSetAndroid ContentProviderAndroid ContextAndroid CoordinatorLayout and BehaviorsAndroid Count Down TimerAndroid Crash Reporting ToolsAndroid Create Singleton Class for Toast MessageAndroid Creating Custom ViewsAndroid Creating Overlay (always-on-top) WindowsAndroid Creating Splash screenAndroid Custom FontsAndroid Dagger 2Android Data Binding LibraryAndroid Data Encryption/DecryptionAndroid Data Synchronization with Sync AdapterAndroid Date and Time PickersAndroid DayNight Theme (AppCompat v23.2 / API 14+)Android Define step value (increment) for custom RangeSeekBarAndroid Design PatternsAndroid Device Display MetricsAndroid DialogAndroid Displaying Google AdsAndroid Doze ModeAndroid DrawablesAndroid EditTextAndroid Email ValidationAndroid EmulatorAndroid Enhancing Alert DialogsAndroid ExceptionsAndroid ExoPlayerAndroid FastjsonAndroid fastlaneAndroid FileProviderAndroid FirebaseAndroid Firebase App IndexingAndroid Firebase Cloud MessagingAndroid Firebase Crash ReportingAndroid Firebase Realtime DataBaseAndroid FloatingActionButtonAndroid Formatting phone numbers with pattern.Android Formatting StringsAndroid FragmentsAndroid FrescoAndroid game developmentAndroid Gesture Detection



Android Firebase Crash Reporting

From WikiOD

How to report an error[edit | edit source]

Firebase Crash Reporting automatically generates reports for fatal errors (or uncaught exceptions).

You can create your custom report using:

FirebaseCrash.report(new Exception("My first Android non-fatal error"));

You can check in the log when FirebaseCrash initialized the module:

07–2020 08:57:24.442 D/FirebaseCrashApiImpl: FirebaseCrash reporting API initialized 07–20 08:57:24.442 I/FirebaseCrash: FirebaseCrash reporting initialized com.google.firebase.crash.internal.zzg@3333d325 07–20 08:57:24.442 D/FirebaseApp: Initialized class com.google.firebase.crash.FirebaseCrash.

And then when it sent the exception:

07–2020 08:57:47.052 D/FirebaseCrashApiImpl: throwable java.lang.Exception: My first Android non-fatal error 07–20 08:58:18.822 D/FirebaseCrashSenderServiceImpl: Response code: 200 07–20 08:58:18.822 D/FirebaseCrashSenderServiceImpl: Report sent

You can add custom logs to your report with

FirebaseCrash.log("Activity created");

How to add Firebase Crash Reporting to your app[edit | edit source]

In order to add Firebase Crash Reporting to your app, perform the following steps:

Create an app on the Firebase Console here.

Copy the google-services.json file from your project into your in app/ directory.

Add the following rules to your root-level build.gradle file in order to include the google-services plugin:

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

In your module Gradle file, add the apply plugin line at the bottom of the file to enable the Gradle plugin:

apply plugin: 'com.google.gms.google-services'

Add the dependency for Crash Reporting to your app-level build.gradle file:

compile 'com.google.firebase:firebase-crash:10.2.1'

You can then fire a custom exception from your application by using the following line:

FirebaseCrash.report(new Exception("Non Fatal Error logging"));

All your fatal exceptions will be reported to your Firebase Console.

If you want to add custom logs to a console, you can use the following code:

FirebaseCrash.log("Level 2 completed.");

For more information, please visit:

Credit:Stack_Overflow_Documentation