https://github.com/backtrace-labs/backtrace-android
Error reporting for Android-based devices
https://github.com/backtrace-labs/backtrace-android
Last synced: 9 months ago
JSON representation
Error reporting for Android-based devices
- Host: GitHub
- URL: https://github.com/backtrace-labs/backtrace-android
- Owner: backtrace-labs
- License: mit
- Created: 2018-12-05T18:46:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-17T20:41:02.000Z (9 months ago)
- Last Synced: 2025-04-18T11:01:50.922Z (9 months ago)
- Language: Java
- Homepage: https://backtrace.io/mobile#android
- Size: 9.54 MB
- Stars: 36
- Watchers: 14
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Backtrace Integration with Android
[](https://search.maven.org/artifact/com.github.backtrace-labs.backtrace-android/backtrace-library)

[](https://javadoc.io/doc/com.github.backtrace-labs.backtrace-android/backtrace-library)

[Backtrace](http://backtrace.io/)'s integration with Android applications written in Java or Kotlin allows you to capture and report handled and unhandled java exceptions so you can prioritize and debug software errors. Backtrace also captures and reports native (JNI/NDK) handled and unhandled exceptions if native integration is enabled.
## Installation
### Gradle
```groovy
// provide the latest version of the Backtrace reporting library.
dependencies {
implementation 'com.github.backtrace-labs.backtrace-android:backtrace-library:'
}
```
### Maven
```xml
com.github.backtrace-labs.backtrace-android
backtrace-library
aar
```
## Usage
### Java
```java
// replace with your submission url
BacktraceCredentials credentials = new BacktraceCredentials("");
BacktraceClient backtraceClient = new BacktraceClient(getApplicationContext(), credentials);
// send test report
backtraceClient.send("test");
// Capture uncaught exceptions
BacktraceExceptionHandler.enable(backtraceClient);
// Enable ANR detection
backtraceClient.enableAnr();
// Enable Crash Free metrics
backtraceClient.metrics.enable();
```
### Kotlin
```kotlin
// replace with your submission url
val credentials = BacktraceCredentials("")
val backtraceClient = BacktraceClient(applicationContext, credentials)
// send test report
backtraceClient.send("test")
// Capture uncaught exceptions
BacktraceExceptionHandler.enable(backtraceClient)
// Enable ANR detection
backtraceClient.enableAnr()
// Enable Crash Free metrics
backtraceClient.metrics.enable()
```
## Documentation
For more information about the Android SDK, including installation, usage, and configuration options, see the [Android Integration guide](https://docs.saucelabs.com/error-reporting/platform-integrations/android/setup/) in the Sauce Labs documentation.