The Raygun4Android provider

Raygun4Android is a library that you can easily add to your Android app, which will then allow you to transmit all exceptions to your dashboard. Installation is painless, and configuring your site to transmit errors takes less than five minutes.

Raygun4Android supports all devices with Gingerbread and newer installed (2.3/API v9). It can be added as a Maven dependency in your pom.xml, or manually adding the JAR to your project if you use Ant or other build tools.


With Maven

To your pom.xml, add:


In your IDE, build your project (or run mvn compile), then see the configuration section below.

With Gradle/Android Studio

To a build.gradle file, add:

repositories {
dependencies {
    compile ''
    compile ''
    compile ''

After syncing the Raygun package will be accessible to import. For Gradle, you may need to add the following specific imports to your class, where you wish to use RaygunClient:


With Ant, other build tools, or manually

Download the JAR for the latest version, as well as the Gson library (if you do not already use it). Place both of these in a /lib folder in your project, add them to your project's classpath, then see below.

Configuration and Usage

  1. In your AndroidManifest.xml, make sure you have granted Internet permissions. Beneath the manifest element add:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  2. Inside the application element, add:

    <service   android:name=""
    <meta-data android:name=""
               android:value="PASTE_YOUR_API_KEY_HERE" />

    And replace the value in meta-data with your API key, available from your Raygun dashboard.

  3. In a central activity, call the following:


    The above exception handler automatically catches & sends all uncaught exceptions. You can create your own or send from a catch block by calling RaygunClient.Send() and passing in the Throwable.

A usage example is also available from the GitHub repository and Maven, in /sample-app.


View the complete Raygun4Android documentation here, including user/version tracking and troubleshooting information.

Raygun4Android GitHub Repository

For complete installation instructions, getting the source code and troubleshooting, visit the GitHub repository here.