android-how to detect my application bug and fix them - android

I've made my app and publish it out . It's been downloaded about 7000 times . it running from api 8 to api 19 .
Before publishing ,I've tested it on 3 different real devices (not virtual) and it was ok .
Now ,about 10 users says that app crashes on different parts and it's bothering me .
How can I find these issues without having real devices ? does virtual devices works the same ? is there any other way that I could find out the problem ? any way I can report the issue from the app and solve it ?
thanks

There are multiple ways of doing this so there is no precise answer.
But the way I do this is through google analytics. I extend the Application class and just send uncaught exceptions to google analytics,
#Override
public void onCreate()
{
super.onCreate();
Thread.setDefaultUncaughtExceptionHandler (new Thread.UncaughtExceptionHandler()
{
#Override
public void uncaughtException (Thread thread, Throwable e)
{
tracker.send(new HitBuilders.ExceptionBuilder()
.setDescription(Arrays.toString(e.getStackTrace()))
.setFatal(true)
.build());
e.printStackTrace();
System.exit(1);
}
});
//...
But as I said you can handle this your own way.

Import analytics into your app
Acra,http://try.crashlytics.com/sdk-android/,
Flurry.
That will show where is your app crashing

Use bugsense, it will provide you the detailed crash report
Go here and sign up and a create a new project
and follow the instructions
https://mint.splunk.com

Here are some crash solutions:
https://github.com/ACRA with a guide ->http://www.toptal.com/android/automated-android-crash-reports-with-acra-and-cloudant
or check https://try.crashlytics.com/
Of course you could just ask the people what device it crashed on and hopefully re-create the bug so that you may find a solution. Good luck

You can view crashes and ANRs in the Play Store developer console: play.google.com/apps/publish/. This will give you a starting point at least.

Related

How to view Adobe Launch data from Android app?

I want to see analytics in my android application, but am struggling to set Adobe Launch and Analytics up.
I have Mobile Core and Analytics set up in the app itself. And it isn't producing any errors on run.
MobileCore.setApplication(this)
MobileCore.setLogLevel(LoggingMode.DEBUG)
try {
MobileServices.registerExtension()
Analytics.registerExtension()
Lifecycle.registerExtension()
MobileCore.start { MobileCore.configureWithAppID("app-id-here") }
} catch (e: Exception) {
// Log
}
And have created the property in Adobe Launch adding the relevant extensions needed, setting up environments and publishing a library. I now have a library published. But have no idea how to view the data gathered from the app? Am I miss understanding what Launch is? Any help on this would be appreciated.
Once registeration is done you can able to see the logs in App logs "AdobeExperienceSDK" but to see the actual event you need to login on AEP dashboard portal.
For setup and instruction please visit below official url from Adobe Launch
https://experienceleague.adobe.com/docs/launch-learn/implementing-in-mobile-android-apps-with-launch/configure-launch/launch-install-the-mobile-sdk.html?lang=en#prerequisites
I may be misunderstanding your question, but if you're asking how to see an aggregation of the data you sent to Adobe, your request contains the address of the repo where you're sending your info. You need to log into Adobe Analytics to see what you sent.
You need to set the events to track the screen views. Example:
Analytics.trackState("Screen Name", null);
The oficial documentation:
https://docs.adobe.com/content/help/en/mobile-services/android/analytics-android/states.html
You can also use https://aep-sdks.gitbook.io/docs/using-mobile-extensions/adobe-experience-platform-assurance , which can let you see Adobe Launch console/debugging notes in the Adobe Griffon interface. A bit overkill for a one-time thing, but if you're going to be spending a lot of time withLaunch in your app, it might be worth setting up.

How to track errors when distributing Android Application to Alpha Testers?

I recently released an application for some users to use my newly made Android Application. However, they are having trouble when they perform the Facebook Login feature that I have made.
It seems to work fine on my phone, but on other phones it seems to crash. I would like to know what is causing the application to crash so I can further debug this. Is there anywhere or anything that I can use to debug this problem further?
I have looked at both the Facebook Developer Console and Google Play Developer Console and neither seem to show or point me to where my error is. If anyone could help that would be great. Thanks!
Use any Crashlytics/Analytics tools to not only get error logs but also usage statictics which can be pretty useful insight during pre-release tests. Some of them like Crashlytics by Fabric are even free and are very easy to integrate. But, there are many others too.
There are plenty of cloud hosted solutions.These might be paid, and require signing up.
If you want to roll you own simple reporting mechanism, then there is an Android library: ARCA . You can set it up to send crash reports to an email address.
First, you'll need to include the library in app's build.gradle file:
compile 'ch.acra:acra:4.9.0'
Then declare extent the Application class (or modify if you already have) as :
import org.acra.*;
import org.acra.annotation.*;
#ReportsCrashes(mailTo = "reports#yourdomain.com",
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)
public class MyApplication extends Application {
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
// The following line triggers the initialization of ACRA
ACRA.init(this);
}
}
The two thing necessary are:
Add #ReportsCrashes annotation to app's application class, with recipient mail address.
Override attachBaseContext() and include ACRA.init() in it.
Official docs:
Setting up ARCA.
Advanced configuration.

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

stuck to when get ACRA bug report?

I need to send the bug report into GoogleDocs CrashReports-Template.
But I am not getting a single error.
#ReportsCrashes(formKey = "dfbhkdfjbnkjsdnkjsdfn")
public class MainActivity extends Application
{
#Override
public void onCreate()
{
super.onCreate();
ACRA.init(this);
}
}
any suggestion?
where am I wrong?
I think you should not use GoogleForms, because developers of ACRA strongly not recommend this. You can read more here https://github.com/ACRA/acra/wiki/Notice-on-Google-Form-Spreadsheet-usage and also note on this:
Unfortunately, we have been asked by Google to stop making our users
automatically post data to Google Forms just before the 'refresh' of
this great tool published a few months ago. The current
GoogleFormSender is working only on 'Legacy Forms'which can't be
created anymore in Google Drive.
So, I think will better to change your reports transporting into other destination:
https://github.com/ACRA/acra/wiki/AdvancedUsage#reports-destination
Sending crash reports to Google Docs isn't supported anymore. Google wasn't happy about this usage. You can find the alternatives in the documentation.

Flurry Error Reporting for Android

Is there anyone using Flurry to generate reports for uncaught exceptions that could post some sample code on how to do this?
I don't see any example via Flurry themselves, and though I've seen code samples of custom exception reporters, I haven't seen a simple example of how to implement the basic error reporting just using Flurry.
Thanks.
This is all good feedback. We're looking into adding full stack traces for error reporting which we'll hopefully see in our next major SDK release. We'll also look at filtering by device model.
In the meantime we've added a new REST API for exporting your error reports if you want to do your own analysis. If you need help using it you can just contact our support or message me.
Sean / CTO / Flurry, Inc.
Flurry does it automatically (if you have it running). However, the error reporting is lame. They only catch the message w/o giving you the stack trace, so you may end up seeing (for example) that people are getting lots of NullPointerExceptions, but you won't have any idea where, or how, they're happening. If you try to do it yourself with the FlurryAgent.onEvent() method you'll quickly discover that they limit you to 255 characters.
If you need detailed error reporting it really is better to roll your own right now.
I wasn't going to post this initially, but since it sounds like Flurry's error reporting sucks, you should check android-remote-stacktrace. It sends the stack trace to a url, which you can use to redirect it to an e-mail or just gather it on the server.
I'm not using it for uncaught exceptions , but you can catch it and then send it to flurry.
I am using bugsense for error reports. It catches full stack trace when an uncaught exception happens and also gives some useful information about the device - OS version, you app's version, is WiFi available on the device, etc. You can add custom messages and tags for specific events.
I've already fixed a couple crashes in my app thanks to it.
Since people are posting alternatives for getting stack traces, I'll recommend ACRA. ACRA can send the stack trace to a spreadsheet on google drive/docs. Or you can also have it send to your server if you wish too. By default it also includes phone model, android version, memory of device, and other data too.

Categories

Resources