How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

 

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading...

 

Tung Dao Xuan, tungdx1210@gmail.com, is the author of this article and he contributes to RobustTechHouse Blog

 

What is ACRA?

ACRA stands for Application Crash Reports for Android. This library helps your software send crash reports to a backend of your choice.

The Acralyzer is an open source backend for ACRA reports that is really simple to install. The only server-side requirement is Apache CouchDB. You can host it on your own server or use the free hosting services of Cloudant.

 

Setup Cloudant backend

Step 1:

Sign up an account with Cloudant

 

Step 2:

Open Replication tab and fill in the fields as shown below:

Source database (Remote Database tab): http://get.acralyzer.com/distrib-acra-storage

Target database (New Database tab) : acra-<name_of_your_database>

 

How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

Then, click the Replicate button.

 

Step 3:

Continue to replicate another:

Source database (Remote Database tab): http://get.acralyzer.com/distrib-acralyzer

Target database (New Database tab) : acralyzer

 

How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

Then, click the Replicate button.

 

After that, open the Databases tab, you will see the 2 databases you have replicated.

How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

 

Step 4:

Open acra-<name_of_your_database> database (in this tutorial is: acra-demo), select the Permissions tab.

How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

 

Click the Generate API key button and note down Key and Password. You will need them when you integrate ACRA with your Android software.

How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

 

Remove the Reader permission and add the Writer permission for the key you have just generated.How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

 

To confirm your backend is created successfully, go to https://<your_cloudant_account>.cloudant.com/acralyzer/_design/acralyzer/index.html and you will see the result as below figure.

How to Setup Cloudant Backend For ACRA (Application Crash Reports for Android)

 

Setup Android code with ACRA.

Step 1:

In build.gradle file, add ACRA library:

compile ‘ch.acra:acra:4.6.2’

Step 2:

In your AndroidManifest.xml file, declare internet permission.

<uses-permission android:name=”android.permission.INTERNET”>

 

Step 3:

In your class that extends from Application class, update ACRA configuration like this

 

Conclusion

You are done! Run your software and see your crash reports to find out where the problems in your software and fix it.

You can configure report content and use other features. To find out more, check out the links below:

https://github.com/ACRA/acra/wiki/AdvancedUsage

https://github.com/ACRA/acra/wiki/ReportContent

https://github.com/ACRA

http://www.acra.ch/

 

RobustTechHouse is a leading tech company for mobile app development and ECommerce web design and development. If you are interested to engage RobustTechHouse for your projects, you can contact us here. If you like our articles, you can follow us on our Facebook.

 

 

Recommended Posts
  • wuziq

    very clear. thank you.

Contact Us

We look forward to your messages. Please drop us a note for any enquiries and we'll get back to you, asap.

Not readable? Change text. captcha txt
Ecommerce9Chargebacks2