My app is crashing randomly and I dont know why.
I saw that there are apps that when there is a force close, you can choose between force close and report.
How can I add it to my application?
Thank you
Ron
I think the best approach in your case is to have the crashes reported automatically in the background as soon as one occurs.
This is achievable through integrating a product like Instabug.
It offers you a plenty of details regarding every crash including the crash stack trace, all network/console logs, an environment snapshot, and visual reproduction steps.
For full disclosure, I work at Instabug. I'm glad to help if you have any questions.
That will be shown to users automatically when your app is delivered via Android market. Although personally, I ACRA because it gives you more information and you can use it regardless of whether the app is distributed via market or not e.g. for beta testing.
http://code.google.com/p/acra/
My favorite is BugSense. Good user interface, good report details, open source client library or use with ACRA.
http://bugsense.com/
I think that comes automatically when you've uploaded your app to the market.
If one of your users decide to report it instead of choosing force close you should get a report in your admin panel (https://market.android.com/publish/Home) Next to the price of the app in question you should find a link called something like error(X) where X is the number of different error reports sent to you.
You could also look into this:
http://code.google.com/p/android-remote-stacktrace/
It's something you can add to your app that makes it sent the stack trace to your server. I find this one use full sometimes!
//André
Although the question is a little old, I guess it’s useful to refresh the information. ACRA is good, but I would also recommend you to try Crashlytics. It has a very simple interface. Thanks to the simplicity, you can easily install and use this tool. It allows not only making ordinary crash reports but also catching NDK crashes.
Here is a comprehensive review of different helpful bug and crash reporting tools for those who are curious in details: http://cases.azoft.com/report-bugs-effectively-mobile-app-testing-tools/
Related
I have been writing a simple Android application (one Activity).
I would really like to gather crash reports from actual user sessions. I know there are some nice 3rd-party libraries. I also read that Google Play Console (Android vitals) should be providing some basic telemetry including crash reports. I was thinking that, to keep things simple, I would stick with the Android vitals for now.
I was wondering whether there is anything I need to do on the Application side to get the crash reports. Or should I just simply let the App crash?
I handle exception that can be handled, but there is always a possibility that one makes it to, say, onCreate. 'onCreate' does not allow throwing checked exceptions though. If I cannot handle it, should I just wrap it in Runtime exception and throw that instead?
Thanks.
Here's an article for a similar approach, https://proandroiddev.com/hide-your-crashes-gracefully-and-still-report-them-9b1c85b25875 However it does not rely on the Android OS crash reporting process; i.e. I don't think you would see the crashes in Android Vitals if you follow the steps described in the article.
You might be able to adapt it though, mainly in terms of restarting the app after the crash occurs.
This is not really a programming question but more of a debuging question.
I have an app that works fine, however, it is a bit unreliable when we try to resume the app.
What happens is, if we background/ minimize it, and than try to resume the app by clicking the app's icon. It sometimes crashes and it sometimes doesn't. It is unreliable that we can not trace what is the issue and why it occurs.
Any possible solution or places we can start tracing for the issue, please advise me :)
Cheers
Not a programming question but it is a development question. It is extremely inconsistent didn't know how to even find the stack-trace
How I solved it was wrapped everything with a bunch of try catch and print the error stacktrace to the screen(or email the developer), finally found out the error was with one of the 3rd party LocationService library I was using.
Note: Location Service is not very reliable, please be caution in how you want to use that feature Android Devs!
I'm having quite tough problem while developing a testing framework for android apps. The text got a bit long so the actual question is in bold for those that don't want to read the context.
Basically, what I'd like to achieve right now is to trace user activity while he's using the application as one of the features. There's my app that manages context data all the time and developer's app - the one being tested. My idea to do this was to get coordinates where user touched the screen along with taking a screenshot simultaneously. Then I'd use the coordinates to mark the spot on the screenshot to get the idea of what user was doing the whole time with the app. Take hints on user experience and trace crashes.
Non-system apps cannot take a screenshot for security reasons, but application itself can take a screenshot of its Activities without much trouble for non-rooted users, e.g. like here. My only hope here is to interfere with developers' code to implement the functionality of doing so while my testing app is running. Each Activity then would have to extend my overridden Activity instead of regular one, implement an interface, implement broadcast receiver etc.
I am going to write a library for developer who would like his app to be tested with my framework. I'd like it to do the job for me and be as non-intrusive as it's possible for him to use. How to achieve that the best way?
Ideal case would assume linking the library to project with maybe a small addition in manifest that'd get the job done and after just unlinking, removing that bit of xml in manifest for production.
That's an open question. I don't expect any bits of code, but some nifty Java trick, Android OS functionality or even completely other approach that'd solve my problem
I tried to be as clear as possible with the question, but that's a quite tough matter for me to describe so that could have turned out contrary. Don't hesitate to ask me for more details, to speak my mind more clearly or even rewrite the question. Thank you all very much for help!
I am currently creating an app and would like to create a demo version (free) and a full version.
However, I am wondering how I can set some sort of flag so that when the demo version has been used 5 times, you have to buy the full version to continue using. This usage will be detected on a submit button.
I was considering setting a flag in the app, however releasied that the user could uninstall the app and then re-install it overcoming my set flag (as this would set it back to 0).
Has anyone got any clever solutions for my little dilema?
Thanks
You might want to try one of the techniques in this answer: https://stackoverflow.com/a/996288/1205715
I think that is not possible with an local application.
File saving to sdcard with strange filename can be a way but It is not perfect.
In my opinion, Right way is using an application server that manages user run times with unique UUID.
It might also be worth thinking about an alternative approach.
In app purchases are now available, so you could have a free and a restricted section in your app, and use the in app purchase to unlock the restricted section. You see more developers going with this approach these days, rather than managing two versions of the app.
Also worth considering the fact that if you have a paid version of the app it can be pirated pretty quickly, one person just needs to get their hands on the full apk. However, if you go with the in app purchase model you will be letting google handle a lot of these issues for you.... just a thought, and the road I will be taking with my next app.
I have found wrapper class for managing contacts, but I am constantly getting that application has stopped unexpectedly. I am trying to get some good and working code to start building open source library for managing contacts that would be simple enough for general use.
Code was found on www(dot).higherpass(dot)com/Android/Tutorials/Working-With-Android-Contacts/
Idea is to make working example of using this, I just cannot succeed in this.
Here is the test project:
http://filebin.ca/uzpgaq/HelloAndroid.zip
If you get an application has stopped unexpectedly error, a stack trace of the Exception that was thrown should pe printed to log. Use logcat in Eclipse or for example the aLogcat app.
Then search for messages with your app's name. In Eclipse you can also create a filter to see only the messages of your app.
If you found the stack trace, see if it gives you a hint where the error could be.
If not, post it here and maybe we can help you then.
I've used this wrapper class successfully in my project, both for SDK < 1.6 and SDK > 2.0 - from the same site and article.
All I can say is that it can work great - you just need to check your usage of it. Post a stack trace and it will be much easier to answer.