Easy Mailer for ACRA (Application Crash Report for Android)
PHP Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ACRAPostSender.java Create ACRAPostSender.java Apr 21, 2013
README.md fixed a typo Jul 11, 2013
acra.php

README.md

ACRA Mailer Flattr this git repo

Easy to use mailer that sends you all crash reports from your Android apps.

Features

  • easy to setup
  • supports custom data
  • nice Bootstrap e-mail layout
  • secured by a shared secret

Requirements

Setup

  1. put acra.php on a PHP enabled webserver
  2. open acra.php, set a secret and save the file
//CONFIG
$shared_secret = "<put your shared secret here>";
  1. download the ACRA JAR and put it in the libs directory in your Android project
  2. add ACRAPostSender.java to our project
  3. open ACRAPostSender.java and setup the base url and the email address
public class ACRAPostSender implements ReportSender {
  private final static String BASE_URL = "http://example.com/acra.php?email=<your email address>";
  private final static String SHARED_SECRET = "<your shared secret>";

(Note: don't put any secrets in the strings.xml! That file an be read by anyone very easily.) 6. setup ACRA with the ACRAPostSender reporter

@Override
public void onCreate() {
        ACRA.init(this);
        super.onCreate();
    HashMap<String,String> ACRAData = new HashMap<String,String>();
    ACRAData.put("my_app_info", "custom data");
        ACRA.getErrorReporter().setReportSender(new ACRAPostSender(ACRAData));

Sample E-Mail error report