https://github.com/loopj/airbrake-android
Airbrake Notifier for Android
https://github.com/loopj/airbrake-android
Last synced: about 1 year ago
JSON representation
Airbrake Notifier for Android
- Host: GitHub
- URL: https://github.com/loopj/airbrake-android
- Owner: loopj
- Created: 2011-02-13T02:54:22.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2012-12-30T21:43:25.000Z (over 13 years ago)
- Last Synced: 2025-04-15T03:55:19.555Z (about 1 year ago)
- Language: Java
- Homepage: http://loopj.com/airbrake-android/
- Size: 183 KB
- Stars: 56
- Watchers: 4
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Airbrake Notifer for Android
===========================
Deprecation Warning
-------------------
I am no longer maintaining this library because I am now using
[Bugsnag](https://bugsnag.com) to track my Android app errors.
Overview
--------
The Airbrake notifier for Android is designed to give you instant notification
of any uncaught exceptions thrown from your Android applications.
Building from Source
--------------------
To build a `.jar` file from source, make a clone of the airbrake-android
github repository and run:
```shell
ant package
```
This will generate a file named `airbrake-android.jar`.
Installation & Setup
--------------------
Copy the .jar file to your Android app's `libs/` folder.
Import the `AirbrakeNotifier` class in your app's main Activity.
```java
import com.loopj.android.airbrake.AirbrakeNotifier;
```
In your activity's `onCreate` function, register to begin capturing exceptions:
```java
AirbrakeNotifier.register(this, "your-api-key-goes-here");
```
Configuration
-------------
The `AirbrakeNotifier.register` call requires a context and Airbrake API key to
be passed in, and optionally a third argument specifying the environment.
The environment defaults to `production` if not set.
To notify Airbrake of non-fatal exceptions, or exceptions you have explicitly
caught in your app, you can call `AirbrakeNotifier.notify`. This call takes
exactly one argument, a Throwable, and can be called from anywhere in your
code. For example:
```java
try {
// Something dangerous
} catch(Exception e) {
// We don't want this to crash our app, but we would like to be notified
AirbrakeNotifier.notify(e);
}
```
License
-------
The Airbrake notifier for Android is released under the Android-friendly
Apache License, Version 2.0. Read the full license here: