Crashlytics

Additional

Language
Java
Version
N/A
Created
Nov 20, 2017
Updated
Nov 26, 2018 (Retired)
Owner
Karthik Periasami (karthyks)
Contributors
Karthik Periasami (karthyks)
karthik-mtap
2
Activity
Badge
Generate
Download
Source code

Advertisement

Crashlytics-Android

Gradle :

compile 'com.github.karthyks:crashlytics:2.0.0-beta2'

Usage :
First step is to initialize Crashlytics inside your application class, along with a CustomCrashEvent class instance, as shown below

Crashlytics.init(Application, new EventListener() {
    new EventListener() {
          @Override
          public void onEventOccurred(List<Event> events) throws Exception {
            // Log to your Cloud DB for future analytics.
            Log.d(TAG, "onEventOccurred: " + events.size());
          }
});

<br/>
If your app has login feature, then the user info can be injected into the Crashlytics, to obtain info about the crashes and events once happened.

```java
Crashlytics.login(company, userid);


In case of any exception thrown in the onEventOccurred method, then the events are stored locally in the db. Once if there are any locally stored events found, then a background worker will run every 15 minutes by default, which in turn keeps on triggering the onEventOccurred method, until it passes.