Alternative to acra (Application Crash Reports for Android) - android

I need a lib for automatic-send to my email account logcats of crash application's user.
I using acra but its use an intent to send email (so is not automatic).
What should be use to send (silent) crash reports?
thanks!

Take a look at the Examples for ACRA
HttpPostSender is a fine example of how to implement ReportSender which will post the data silently, located here:
http://code.google.com/p/acra/source/browse/trunk/examples/CrashReport/src/org/acra/sender

Related

How to learn a reason why a 3rd party, non-debuggable app crashed

In Android, is there a way to tell why app crashed on my device? Let's say I have root access to the device, but the app that crashed is not debuggable and does not print anything to logcat.
Just to reiterate, the app that crashed is not my app, I have no access to the source, and it's not debuggable (it's a release build). I just want to get any available insights on why it crashed.
EDIT: I forgot to mention, I only found the /data/anr/ and /data/tombstones as sources for potential information. Those do not contain the stacktraces. Is there anything more available?
EDIT: There is a lot of confusion in comments, please read the question carefully. What I'm after is some kind of low level component that knows about the reason of the crash. The virtual machine must know, right?
I identified following sources that may or may not have useful information about 3rd party apps crashes:
adb logcat -b crash
/data/tombstones/
/data/anr/
Cannot. In third-party app, you cannot get detail about crash report. In some rarely case, third-party application has saved crash reports to log file. If you know file location, you can analyze crash on that log file. Otherwise, there isn't any way.
In case you develop your own app, and your application already has released to user and you want to get some statistic about crash event. You can gain some insight by using Crash Report Service as I mention below.
In case you want go get crash report from your own application, here is some libraries and services for your: ACRA library. Crash report will generated and post to Google Form. Really easy to use and setup in your application. As document stated:
#ReportsCrashes(formUri = "http://www.yourselectedbackend.com/reportpath")
public class MyApplication extends Application {
#Override
public void onCreate() {
// The following line triggers the initialization of ACRA
super.onCreate();
ACRA.init(this);
}
}
But you must have your own server. (There are tutorials for deploying this server, but you still must have your own). If you want to depend all to third-party service then Crashlytics or Crittercism or Countly or Google search query

How to get the Log and Crash data for android live app?

I have developed one android application. Now we are testing this application in production environment.
I have to track the below information with out depending on tester to share the log file,
Send Log file. May be Logcat data. Foe Example If any web service fails we need to write that into log file then same needs to be sent to the server or to given mail id.
If there is any crash in our app then we can get the stach track by using getDefaultUncaughtExceptionHandler then we need to send the stack trace info via mail or send it to web server.
Or else I can use any solution provider like Google Analytics, Crashlytics or else I can write the log data to text file. And then same to be sent via mail on a daily or weekly basis.
Help me on this.
It's about time you move to crashlytics https://try.crashlytics.com/ or critisism http://www.crittercism.com/ check it out, infact there is ton of other options out there
With a service like http://www.apteligent.com (Crittercism renamed to Apteligent), when looking at a crash, you'll be able to automatically see a log of: web service calls, network connectivity changes, changes to screen views, and app foreground/background events that led up to the crash without manually adding any additional logging to your app:
https://www.apteligent.com/2016/03/working-automatic-breadcrumbs/

How to send Crashlytics log

I am using Crashlytics (now known as Fabric) in my app.
It works well when the app crashes. I can find the issue on the dashboard.
I am trying to use the logging. Something like:
Crashlytics.log(Log.WARN,MYTAG,"Error message");
I am not able to send this log in the dashboard. I have just tried to add something like:
Crashlytics.logException(new RuntimeException("Fake exception"));
but it doesn't send the log.
Can Crashlytics send the log?
You are sending the Log properly. But see what Official doc says Logging Caught Exceptions
All logged exceptions will appear as "non-fatal" issues in the Crashlytics dashboard.
To reduce your users' network traffic, Crashlytics batches logged exceptions together and sends them the next time the app launches. If you don't see logged exceptions in your Crashlytics web dashboard, try restarting your app!
In Android, send a custom crash by using
Crashlytics.logException(new RuntimeException("Fake exception"));
Then restart your application
In Crashlytics, select the Non-Fatals
On newer versions of Crashlytics, you need to use these functions:
FirebaseCrashlytics.getInstance().log("Your message goes here")
FirebaseCrashlytics.getInstance().recordException(RuntimeException("Your message goes here"))
Edit:
As #Peter mentioned in the comments, using log alone will not work and you have to use recordException function to bundle your log message along with the exception

Android ACRA form key?

I just started to build the concept using ACRA which will capture crashing error. And I want it to be emailed.
I am follwing this ....
http://code.google.com/p/acra/wiki/AdvancedUsage#Sending_reports_for_caught_exceptions_or_for_unexpected_applicat
So what is a form key? And where should I get it ?
Thanks.
ACRA can deliver the crash report using several different methods. one of those methods is posting to a google docs form. the form key is the google docs form key.
with the email method, the form key is not relevant. it's only for use with the google docs form method.
as a side note, the google docs method is the easiest and simplest to use. unless there's a reason why you need delivery via email, use google docs. you can even configure the form so you get an email when the form is updated - best of both worlds.
Please read the ACRA wiki BasicSetup.
In short, you have to copy the CrashReports-template.csv file from ACRA to Google Docs and create a form from it. Google Docs will then create a formKey for the form, which you can find in the link at the bottom of the form creation page.
EDIT:
Jeffrey Blattman's answer is more relevant, the formKey is not required in case of emailing the crash report.

What is Log Collector and how it works?

What is a Log Collector an how does it works? Please help me out in understanding this.
Collects output of logcat and sends it to a developer using email or messaging. Can be used as a standalone application or invoked through the intent API by another application.
check this also for an example http://code.google.com/p/android-log-collector/downloads/detail?name=android-log-collector-1.1.0.apk
It's a component that would store some logging informations, generally in order to send them to a remote location (by email, http request, ...).
For an example you can take a look at the following project : android-log-collector.
On android, "log" generally corresponds to the LogCat.

Categories

Resources