You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AirbrakeNotifier.register(this, "<Your project API KEY>");
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:
try {
// Something dangerous
} catch(Exceptione) {
// We don't want this to crash our app, but we would like to be notifiedAirbrakeNotifier.notify(e);
}
Installation & Setup
Download the Airbrake Jar or build from source via GitHub
Copy the
.jar
file to your Android app'slibs/
folderImport the
AirbrakeNotifier
class in your app's main Activity:In your activity's
onCreate
function, register to begin capturing exceptions.(You can find your project API KEY with your project's settings):
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 toproduction
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:For more information please visit our official GitHub repo.
The text was updated successfully, but these errors were encountered: