Gérer les rapports d’erreurs d’une application Android avec Acra

ACRA est une librairie pour les développeurs d’applications Android qui permet l’envoi automatique de rapports de crash lorsque l’application s’arrête brutalement ou ne fonctionnement pas correctement.

1. La philosophie de la libraire

Directement inspiré de ce que propose Alocaly (envoi de rapports d’erreurs par e-mail qui nécessite cependant une confirmation à chaque envoi), ACRA fait beaucoup plus fort. Là où certaines librairies impliquent d’avoir un serveur dédié sur lequel les rapports d’erreurs sont hébergés, ACRA intègre l’envoi/stockage des rapports directement sur une feuille d’un tableur de type Google Spreadsheets.

La librairie est Open Source, sous licence Apache. Elle peut donc être utilisée dans nimporte quelle application (payante ou gratuite).

2. Qui utilise ACRA ?

D’après AppBrain, la célèbre source d’informations sur les applications du Google Play Store, ACRA est utilisé dans 2,76% des applications disponibles sur la plateforme de Google (chiffres à Janvier 2015).



Les applications qui implémentent le service proposé par ACRA n’appartiennent pas à une catégorie en particulier. On retrouve aussi bien des applications de productivité comme Adobe Reader que des jeux ou des launchers.

Le récapitulatif complet de l’utilisation de la librairie ACRA : http://goo.gl/w6vQ0K

3. Les avantages

Parmi les nombreux avantages de cette librairie :

  • Hébergement par Google (Google Docs Sheets)
  • Si la connexion internet n’est pas active au moment du crash, le rapport de bug est stocké en local et sera synchronisé ultérieurement
  • Ne nécessite pas la validation de l’envoi par l’utilisateur
  • Simplicité de mise en place

4. L’interaction avec l’utilisateur

Lors de l’arrêt brutal de votre application, vous avez 4 possibilités d’interagir avec l’utilisateur pour l’informer :

  • Silencieux : Les rapports d’erreurs sont envoyés en fond de tâche
  • Toast : Un message est affiché temporairement et les rapports d’erreurs sont envoyés simultanément
  • Notification : Une notification est ajoutée dans la “Status Bar” et le rapport sera envoyé seulement si l’utilisateur accepte l’envoi du rapport (avec un commentaire optionnel).
  • Boite de dialogue: une boite de dialogue contenant les informations du rapport d’erreur.

5. Mise en place

La simplicité de mise en place est un des principal avantage de ACRA. Ci-dessous, la procédure de mise en place de la librairie au sein d’un projet d’application Android (Eclipse) :

  • Télécharger la dernière version de la librairie ACRA : acra-X-X-X.jar (4.5.0 au 06/02/2015)
  • Placer la librairie dans un dossier “libs” à la racine de votre projet
  • Ajouter la librairie au “Build Path” de votre application :
  • Project> Properties > Java Build Path > Add JARs…
  • Création de la classe “MyApplication” qui hérite de android.app.Application.


  • Ajouter la classe “MyApplication” à l’élément <application> du fichier MANIFEST (/AndroidManifest.xml) et donner les droits d’accès à internet pour l’application.


  • Donner la permission à l’application de se connecter à Internet


C’est prêt! 


56 Comments Gérer les rapports d’erreurs d’une application Android avec Acra

  1. jasa backlink

    I’m trսly enjoying the design and ⅼayout oof your site.
    It’s a vеry easy on the eyes whicch maкes it much more enjoyabⅼe for me to come
    here and vіѕit moге often. Did you hire out a developer to create your theme?
    Exceptіonal work!

  2. Victorina

    I don’t know whether it’s just me or if everybody else experiencing issues with your blog.

    It looks like some of the text in your posts are running off
    the screen. Can somebody else please comment and let me know if this is happening to them as well?
    This might be a issue with my web browser
    because I’ve had this happen previously. Cheers

  3. Gloria

    An intriguing discussion is definitely worth comment. There’s
    no doubt that that you should publish more about this subject,
    it may not be a taboo subject but typically people do not speak about these issues.
    To the next! Best wishes!!

    my site – judi slot pandora188 (Gloria)

  4. download slot game ntc33

    Hmm it looks like your site ate my first comment (it was super long) so I guess I’ll just sum it up what
    I had written and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m
    still new to everything. Do you have any tips for newbie blog writers?
    I’d genuinely appreciate it.

    Feel free to visit my homepage: download slot game ntc33

  5. Joe

    excellent post, very informative. I’m wondering why the
    opposite experts of this sector don’t notice this. You must proceed your writing.
    I’m sure, you have a great readers’ base already!

  6. Brigida

    whoah this blog is excellent i love studying your articles.
    Keep up the great work! You recognize, lots of people are searching round for this
    info, you could aid them greatly.

  7. serverlist101

    A feew things i have generally told men and women is that while looking for a good on the net electroniics shop, there are a few aspects that you have to consider.
    Firest and foremost, you should make sure to get a reputable and in addition, reliable retail
    store that has gotten great assessments and classification frokm other customers aand business sector analysts.
    This will make sure that you are handling a well-known store
    that delivers giod assistance and support to it’s patrons.
    Thanks for sharing your notions on this blog site.

  8. situs judi slot online terpercaya

    Hello there! I know this is kind of off topic but I was wondering which blog platform
    are you using for this site? I’m getting fed up of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform.

    I would be fantastic if you could point me in the direction of a good platform.

  9. Jennie

    Hmm it looks like your site ate my first comment (it was extremely long)
    so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m still new
    to everything. Do you have any suggestions for novice blog writers?
    I’d certainly appreciate it.

  10. Aretha

    Great post. I was checking constantly this blog and I am impressed!

    Extremely helpful information particularly the last part 🙂 I care for such info a
    lot. I was looking for this certain information for a long time.
    Thank you and best of luck.

  11. judi slot online indonesia

    Simply wish to say your article is as amazing. The clearness in your post is
    simply excellent and i can assume you’re an expert on this subject.

    Well with your permission let me to grab your feed to keep
    up to date with forthcoming post. Thanks a million and please keep up the gratifying work.

  12. xe88 website

    My developer is trying to convince me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress on various
    websites for about a year and am anxious about switching to another
    platform. I have heard very good things about blogengine.net.

    Is there a way I can import all my wordpress content into it?
    Any help would be greatly appreciated!

    Here is my web-site; xe88 website


    Thanks for finally talking about > Gérer les rapports d’erreurs d’une application Android avec Acra | Joey Bronner < Liked it!Play Slots 4 Real Money LLC
    First Edmonton Place, 10665 Jasper Ave 14th Floor, Edmonton, AB, T5J 3S9 Canada
    1 587-525-7000
    1 587-525-7001


  14. baca infonya

    I was wondering if үoou ever thought of changing the page ⅼayouut of your blog?
    Its very well written; I love what youve got to say. But maybe you
    could a little more in the wayy of content so people could connect wifh it better.
    Youve got an аwful lot of text for only having
    1 or 2 pictures. MayƄe you coul spacе it out better?

  15. baca infonya

    Wow, aᴡeseome blog format! How lengthy have you
    been running a blog for? you make blogging glance еasy.
    The entіre look of yߋur site is magnificent, let alone the cntent

  16. Rita

    I will right away snatch your rss feed as I can not find your email subscription hyperlink
    or e-newsletter service. Do you’ve any? Please permit me realize
    in order that I could subscribe. Thanks.


Leave a Reply

Your email address will not be published.