I am just about to release an app and I saw this stackoverflow question about things you should do before releasing an app. It tells me to use ACRA so I followed the instructions on this page.
So know I have a class called MyApplication
like so :
import android.app.Application;
import org.acra.*;
import org.acra.annotation.*;
@ReportsCrashes(formKey = "", // will not be used
mailTo = "[email protected]",
mode = ReportingInteractionMode.TOAST,
customReportContent = { ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT },
resToastText = R.string.crash_report_text)
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// The following line triggers the initialization of ACRA
ACRA.init(this);
}
}
Now apparently when my application crashes I think the user is supposed to be able to send the report somehow, so I put a null pointer in my app but it just crashes and nothing happens. Am I supposed to do anything else?
I guess you might not have registered your application on BugSense
Where you want to send the crash reporst that depands on you only. When you are using Google Docs (deprecated now), you have to use your formKey
you got from your google docs document.
If you want to store the reports on your own server, you can leave the formKey
field blank. The only thing you have to do is to enter a valid url to your server (formUri = ....)
.
The other strings are for the type of dialog, which should or shouldn't appear.
Instead of using your own server, you can use BugSense. See this thread on stackoverflow.
**BugSense**
as your Back-End service:1. Go to their site and sign in: http://www.bugsense.com/
2. Create a new project to monitor in
BugSense
site, as a result you will receive anAPI Key
for this application.3. Finally add this line to you Application class in you project:
@ReportsCrashes(formUri = "http://www.bugsense.com/api/acra?api_key=YOUR_API_KEY", formKey="")
Check out BugSense Docmentation