Okay, I have started out with a very simple and not at all streamlined implementation. Some documentation and a binary can be found here: http://code.google.com/p/android-remote-stacktrace/
I'll be updating it, as I go along, but if you have anything you want to add, please let me know. The idea is that you should just be able to drop in the "trace.jar" available at the link above file into your Android project, call "ExceptionHandler.register(this)" in your activity and stack traces will then be posted to either the default server at http://trace.nullwire.com or to a server of your choice (see the page above). The latter requires the installation of a simple PHP script on your server. You can also just have a look at the source and copy paste the parts you need - if you have any suggestions or feedback, please let me know.. I'll maintain http://trace.nullwire.com and maybe implement a simple admin interface if anyone is interested - how about a RSS feed with the exceptions or maybe even a direct twitter message on exceptions ;) .. But let's see - if there is a demand, I'll create something simple to view ones own exceptions.. There are a couple of issues that I would like to solve with this first version: 1) When an exception occurs, the application will just drop back to the home screen and the user won't actually know that an exception has occured. 2) The application will have to be restarted again before the stack traces are posted. I've been using a service for the applications I have done so far, so traces were posted, when the service restarted (i.e. almost immediately). Maybe someone has a solution to the two issues above, but in any case, I'll be using this implementation myself and I'll have to figure out something eventually. Please let me know about your experiences and any problems you might have. Best regards, Mads Kristiansen On Thu, Mar 5, 2009 at 1:19 PM, [email protected] < [email protected]> wrote: > > That would be really great if you could post something Mads. > > Alex > > > > On Mar 5, 11:50 am, Mads Kristiansen <[email protected]> > wrote: > > Yes, you are right. It could probably be helpful to others and I'd be > happy > > to share - I'll see if I can create a component somehow over the weekend. > I > > don't have the code with me right now, but I'll be back ;) > > > > Basically I just have a default exception handler, which will catch all > > unhandled exceptions. I'll then batch them up and at a later time, I'll > then > > submit the available traces to my server (and then of course also delete > > them on the phone, when they have been submitted). > > > > / Mads > > > > On Thu, Mar 5, 2009 at 12:40 PM, [email protected] < > > > > [email protected]> wrote: > > > > > Mads, > > > > > Thats exactly what we all need. > > > > > How do you get unhandled exceptions or do you put try...catch in all > > > your code blocks? > > > > > Do you submit stack traces individually or batch them up? > > > > > Any chance of sharing some of the code? > > > > > We really need a generic component for this - it will be a huge boost > > > for quality of the apps! > > > > > Alex > > > > > On Mar 5, 11:30 am, Mads Kristiansen <[email protected]> > > > wrote: > > > > I do this in my beta applications and it is incredibly valuable. > > > > > > I am not aware of any existing implementations, so I built it myself. > > > I'll > > > > store the stacktraces on the phone and upload them to a webserver, > where > > > I > > > > have a PHP script which will store the stack trace to a plain text > file > > > and > > > > also send me an email with the details. > > > > > > Some of the stack traces I collected would probably have taken me > days to > > > > reproduce myself. > > > > > > / Mads > > > > > > On Thu, Mar 5, 2009 at 11:44 AM, [email protected] < > > > > > > [email protected]> wrote: > > > > > > > We all know what its like - everything works perfect on the dev's > > > > > phone, but once you roll something out, user's complain about the > > > > > dreaded force close!! > > > > > > > Sometimes its just on one or two phones, but wouldn't it be good if > we > > > > > could get some kind of stack trace to see whats really going on? > > > > > > > Obviously we can't speak to our users in person or play with their > > > > > phones, so we need some way of getting error diagnostics off their > > > > > phone and onto the dev's computer. > > > > > > > I was thinking along the lines of apps having a generic exception > > > > > handler which could store the stack trace and then maybe upload to > a > > > > > web server so that the dev can take a look - anyone achieved > something > > > > > like this? > > > > > > > Maybe the SDK should (or already does?) support something like this > - > > > > > I think it will benefit developers and users enormously!! > > > > > > > Alex > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

