Not Being Able To Send Crash Report By Email

633 views
Skip to first unread message

bopanna

unread,
Nov 15, 2011, 3:13:38 AM11/15/11
to acra-discuss
Hi Kevin,

I have added the acra-4.2.3.jar to my app. And in the ACRA class i
have used the following annotation,

@ReportsCrashes(formKey = "", // will not be used
mailTo = "x...@gmail.com",
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)



I'm an amateur here. Kindly help me with this.
From what I have understood in this is that, whenever the app crashes
the crash report is sent to the personal mail id as mentioned in the
annotation (mailTo = "x...@gmail.com").

I have followed all the steps till here but whenever the app crashes I
am not receiving any report to my personal mail
id. I have internet connection on my device and I cant figure out the
reason for not getting the report and what I may have missed out on in
the code. I don't know whether the app itself send the report or that
it chooses the primary mail set up with the device. I am confused.
Kindly help me out in this.Much appreciated.

Regards,
Bopanna

Kevin Gaudin

unread,
Nov 15, 2011, 3:52:05 AM11/15/11
to acra-d...@googlegroups.com
Hi,

Did you also add the ACRA.init(this) in your applicatin subclass onCreate() method ?

Also, the mail is not sent automatically, when ACRA is activated and a crash occurs, it will prompt you for a mail client (or open your default mail) and paste the content of the report in an e-mail draft.

If you have some logcat traces of your app start, please share them with us. There should be ACRA traces inside. If not, then the call to ACRA.init(yourApplication) never happens.

Kevin

bopanna

unread,
Nov 15, 2011, 5:17:11 AM11/15/11
to acra-discuss
Hi Kevin,

Thanks a lot for your help.

I figured out what the problem was.I had a made a silly mistake. I
forgot to mention the ACRA class name within the application tag in
the Manifest.xml.
So, ACRA was not getting initialized during the application start up
and hence the problem.

And yes as you said it prompts for a mail client when crash happens.
I wanted to know if it could send the report without prompting for the
mail client. Can it automatically send the report to the mail id
mentioned in the annotation (mailTo = "x...@gmail.com") ??

Thanks for your help again.

Bopanna

Kevin Gaudin

unread,
Nov 15, 2011, 5:24:22 AM11/15/11
to acra-d...@googlegroups.com
The e-mail reporting feature is targetted to apps developers who don't want to add the INTERNET permission to their apps.

This allows to add a crash reporting feature for local only apps (like clocks or personal data management...) for which some users would think the INTERNET permission is abusive.

If you are not in this case, I would advise you to choose the GoogleDoc Form/Spreadsheet mode. There is no way to send an e-mail without asking the user.

Kevin

bopanna

unread,
Nov 15, 2011, 5:44:07 AM11/15/11
to acra-discuss
Got it. Thanks a lot for the information and help. It was very useful.
Much appreciated.

Bopanna

bopanna

unread,
Nov 15, 2011, 6:21:29 AM11/15/11
to acra-discuss
Hi Kevin,

Just one more clarification. This is quite out of the current
discussion thread.

If I have to implement my own sender, say like

public class Bopanna implements ReportSender {

public Bopanna(... your params ...){
// initialize your sender with needed parameters
}

@Override
public void send(CrashReportData report) throws
ReportSenderException {
// Iterate over the CrashReportData instance and do whatever
// you need with each pair of ReportField key / String value
}
}

How do I implement this? I mean where do I create an object of the
class ? And how does it really help me in getting the crash report.
I know its a silly question. But it could be really useful for me.

Thanks again as always.

Bopanna

Kevin Gaudin

unread,
Nov 15, 2011, 7:57:29 AM11/15/11
to acra-d...@googlegroups.com
You can implement your own sender.... if you need to do anything with reports data.

Some will need to format the data in a specific format (json, xml, whatever) before sending it to a custom server, others might want to trigger a specific action depending on the content of one field... You can imagine anything based on reports data and what you want to do with it, with the limitation of the app being killed immediately after senders execution.

You can place your class in any package of your project, you just have to instantiate it in your own code and pass it to ACRA with one of the dedicated methods (addReportSender(), setReportSender()).

Kevin

bopanna

unread,
Nov 16, 2011, 6:20:29 AM11/16/11
to acra-discuss
Hi Kevin,

Is there a way to send the Crash report by email as well update in the
Google docs at the same time ??

Bopanna

Kevin Gaudin

unread,
Nov 16, 2011, 6:22:19 AM11/16/11
to acra-d...@googlegroups.com
If you just want to be warned that a report has been received, use the notifications features for your Google Docs spreadsheet.

Kevin

saim...@gmail.com

unread,
Aug 11, 2016, 3:47:59 PM8/11/16
to acra-discuss
I tried everything but still I cannot get any email. How to check if i integrated the ACRA correct Please help.

William Ferguson

unread,
Aug 15, 2016, 4:06:39 AM8/15/16
to acra-discuss
"tried everything" is pretty vague.

What does your logcat say, when you initiate a crash?

William

vijaya priya

unread,
Jun 1, 2017, 4:51:22 AM6/1/17
to acra-discuss
I get following error not able to receive mail instead get Toast unsupportted action

06-01 13:48:22.879 1692-2180/? W/ActivityManager:   Force finishing activity com.demo.my.tabexample/.MainActivity
06-01 13:48:22.883 1692-2179/? I/ActivityManager: START u0 {act=android.intent.action.SENDTO dat=mailto:xxxxxxx...@xxxxx.xxx flg=0x10000000 cmp=com.android.fallback/.Fallback (has extras)} from uid 10091 on display 0
Reply all
Reply to author
Forward
0 new messages