This library will help you monitor your Android app's crashes.
In your app-level "build.gradle" file, put:
dependencies {
implementation 'com.crashops.sdk:crashops:0.3.02'
}
In your root-level "build.gradle" file, put:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
In your app-level "build.gradle" file, put:
dependencies {
implementation 'com.github.CrashOps:Android-SDK:0.3.02'
}
To recognize your app in CrashOps servers you need an application key, you can set it via code (programmatically) either via config file.
// Kotlin
CrashOps.getInstance().setAppKey("app's-key-received-from-CrashOps-console")
// Java (pretty much like Kotlin ๐)
CrashOps.getInstance().setAppKey("app's-key-received-from-CrashOps-console");
Use the crashops_config.xml file and place it in the values folder.
By default, CrashOps is enabled and it runs automatically as your app runs (plug n' play) but you always can control and enable / disable its behavior with two approaches: dynamically or statically.
Dynamically: Programmatically call the method disable()
/ enable()
as demonstrated here:
// Kotlin
CrashOps.getInstance().disable()
// OR:
CrashOps.getInstance().enable()
// Java (pretty much like Kotlin ๐)
CrashOps.getInstance().disable();
// OR:
CrashOps.getInstance().enable();
Statically: Add a crashops_config.xml file to your values folder and the SDK will read it in every app launch (using this approach may still be overridden by the dynamic approach). Do you wish to set different values for debug / release ? use Android flavors.
We're using retrofit to upload our log files.