how can I send log information from my Android app to my server?

懵懂的女人 提交于 2019-11-30 19:04:00
AnkitSomani

There are few version for crash reporting..

  1. Hockey App
  2. Acra
  3. BugSense
  4. Android Remote stack trace
  5. Since your app can always read logs for it's own process, you can also implement something of your own.

Out of all these, I personally prefer Acra. as it is most efficient and give many options to app developers.

I'm using ACRA for logging crashes from my app but based on their documentation,

  • you can add your own variables content or debug traces to the reports
  • you can send error reports even if the application doesn't crash

Which seems to be doing what you want.

https://github.com/ACRA/acra

You will need to run your own ACRA server (simple enough to run) and get your app to send the crash logs to your server. Everything is detailed on their website.

I would look into using a third party production crash system, there are a few out there. I am currently using Crashlytics. This specific service allows you to log and set key value pairs during the running of the application that get packaged with the crash report. These services also offer greater insight into the device type, OS and a variety of other device details.

With this set up I have then created a log function that will submit to the Crashlytics service as well as logging it to log cat.

You can also use Google Analytics or Flurry. But note that Google Analytics doesn't log stack traces and Flurry doesn't support real-time log reports on server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!