how to test ACRA and get the logcat of the applicaiton crash

66 views
Skip to first unread message

dinesh

unread,
Jul 23, 2011, 1:05:34 AM7/23/11
to acra-discuss, diensh.t...@lsnsoft.com
Hi,

I am a novice at using ACRA, i want to include this feature and test
in my application before it is placing on android market and also i
want to get the Log stack trace for the application crash.


I implemented in the way

@ReportsCrashes(formKey = "dHlYZHU0Q3hhb0lXd081eEN5Nl9vb3c6MQ")
public class MyApplication extends Application{
@Override
public void onCreate() {
// The following line triggers the initialization of ACRA
ACRA.init(this);
super.onCreate();
}
}

<application android:icon="@drawable/icon" android:label="@string/
app_name"
android:name="MyApplication">

<uses-permission android:name="android.permission.INTERNET"></uses-
permission>


Is there any thing wrong ?
How to test my application, and also i need to get stack trace.

William Ferguson

unread,
Jul 23, 2011, 5:40:01 PM7/23/11
to acra-discuss
Hi Dinesh,

assuming that "dHlYZHU0Q3hhb0lXd081eEN5Nl9vb3c6MQ" is the key for the
form created from *your* Google doc, then that looks correct.
What ACRA log is being shown?

William

dinesh kumar

unread,
Jul 25, 2011, 12:03:34 AM7/25/11
to acra-d...@googlegroups.com, william.f...@gmail.com
Hi william,

First of all thanks for your reply.


After i included i can run the application successfully. I did not get any logcat for the ACRA.

How should we know that it is working? and also i tried to break the application and google -doc is not updated.

If the application crashes i want that logcat to resolve errors.



William Ferguson

unread,
Jul 25, 2011, 12:14:52 AM7/25/11
to acra-discuss
Dinesh, what version of ACRA are you using?

Are you sure that "dHlYZHU0Q3hhb0lXd081eEN5Nl9vb3c6MQ" is the key for
the form attached to your Google doc?
If you open up the spreadsheet and go to Form->EditForm, what is the
key at the bottom of the page?
On your spreadsheet, in the Form menu is "Accepting responses"
checked?


Try deploying your app to an emulator or device and starting the
Android logcat for that emulator or device. Now start your app.

Do you see ACRA log in the logcat, indicating that ACRA has been
started by your app?

Now execute something on your app that will cause a crash. I suggest
explicitly throwing a RuntimeException from a button click. Do you see
ACRA log in your logcat indicating that it is handling the Exception?

Open up your spreadsheet again, do you see a row for the crash you
just generated?


William

dinesh kumar

unread,
Jul 25, 2011, 3:43:06 AM7/25/11
to acra-d...@googlegroups.com

I got it now it works, problem is with Accepting Response,

Thanks

William Ferguson

unread,
Jul 25, 2011, 8:57:53 PM7/25/11
to acra-discuss
Cool
Reply all
Reply to author
Forward
0 new messages