简体   繁体   中英

How use ACRA system to detect crashes in android?

i want to use ACRA to call a certain web service to my server to report a crash in android app , thus my server is not integrated with any thing to ACRA system i just want to call my own web service when crash is happened and get crash data from ACRA and send it with my web service parameters .Is it possible ? thanks

   @ReportsCrashes(
    formUri = "http://myserver/ErrorLogging/Logger.svc",
    reportType = HttpSender.Type.JSON,
    httpMethod = HttpSender.Method.POST,
    formUriBasicAuthLogin = "serverusername",
    formUriBasicAuthPassword = "serverpass",
    mode = ReportingInteractionMode.DIALOG,
    resToastText = R.string.message

If your server can't handle one of the Standard options (Form or JSON, POST or PUT), you can create your own ReportSender . You then have to supply ACRA with a ReportSenderFactory , which returns your custom Sender.

Based on you using svc instead of the official backend, I'm going to take a guess and say you have client side(app) under control and what you need, is something to recieve the crashes. Now, this really depends on your hosting. Full list here

As long as you can run PHP files, you can use PHP hosting files(probably the reason there are so many of them). If you cannot do any of the above, @F43nd1r's answer is the best way to go. Most of the above backends does not need to implement a new sender, as they use the implemented sender.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM