[android-developers] Re: Local Service vs Remote Service

2010-11-16 Thread Lance Nanek
Yeah, in my personal apps I call the previously registered default uncaught exception handler from my own. That's why users still get the force close option. Doing a network call beforehand in the same process doesn't work well. If you wait you can get situations where there's an ANR as well as

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-11 Thread Kostya Vasilyev
The default Android force close dialog is displayed by the default uncaught exception handler. If you replace the uncaught exception handler, make sure to call the previous uncaught exception handler from yours, presumably after writing / sending the exception information. So you can have

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-11 Thread Mark Murphy
On Thu, Nov 11, 2010 at 4:14 AM, Kostya Vasilyev kmans...@gmail.com wrote: The default Android force close dialog is displayed by the default uncaught exception handler. If you replace the uncaught exception handler, make sure to call the previous uncaught exception handler from yours,

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread Dianne Hackborn
On Wed, Nov 10, 2010 at 1:25 AM, William Ferguson william.ferguson.au@ gmail.com wrote: Um, I think the point that Lance was trying to make was that he won't actually know about the force close UNLESS he uses the remote service. But sure, once he knows about, then he could fix it. If the

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread Dianne Hackborn
On Tue, Nov 9, 2010 at 11:33 PM, Lance Nanek lna...@gmail.com wrote: I can think of no scenarios in which you need a service to run in a separate process. I've run into a scenario. Force close kills your process. So if you want to do an internet call on unhandled exceptions, doing it in

[android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread William Ferguson
Um, I think the point that Lance was trying to make was that he won't actually know about the force close UNLESS he uses the remote service. But sure, once he knows about, then he could fix it. On Nov 10, 7:14 pm, Dianne Hackborn hack...@android.com wrote: On Tue, Nov 9, 2010 at 11:33 PM, Lance

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread Mark Murphy
Personally, I would use Thread.setDefaultUncaughtExceptionHandler() to eliminate the force-close dialog and deal with the unexpected exception myself, such as logging it to a server. This does not require a remote process. On Wed, Nov 10, 2010 at 4:29 AM, Dianne Hackborn hack...@android.com

[android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread William Ferguson
Forgive if I have this wrong, but I thought the report button only shows for Froyo and beyond. I certainly don't see it on 2.1 on my GalaxyS. If its for reporting the crash to oneself (as it seems to be - to handle all Android versions), then handing it off to another process to send the data to

[android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread William Ferguson
Mark, as I noted above, the reason I think a remote process is a valid solution here is to ensure that the crash info is actually sent. I wouldn't rely upon the failed process to send that data. I presume that is what the Froyo Exception logging (to Market) does, but perhaps it just wings it.

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 6:38 PM, William Ferguson william.ferguson...@gmail.com wrote: rather than relying on a process that is already in a bad state and is trying to destroy itself. The process is not in a bad state. Some piece of your code is in a bad state. That way the process that is

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 6:41 PM, William Ferguson william.ferguson...@gmail.com wrote: Mark, as I noted above, the reason I think a remote process is a valid solution here is to ensure that the crash info is actually sent. I wouldn't rely upon the failed process to send that data. Your

[android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread William Ferguson
Sorry, I may have muddled several concepts here .. I'll blame lack of sleep. I was thinking that a RuntimeException force closes an app and that there is limited opportunity to capture the failure (pre Froyo) before the app is destroyed. But if using Thread.setDefaultUncaughtExceptionHandler()

Re: [android-developers] Re: Local Service vs Remote Service

2010-11-10 Thread Mark Murphy
On Wed, Nov 10, 2010 at 7:17 PM, William Ferguson william.ferguson...@gmail.com wrote: But if using Thread.setDefaultUncaughtExceptionHandler() actually stops the force close then there is opportunity to dispatch the crash report since the app won't be destroyed. Whether the crash dispatch

[android-developers] Re: Local Service vs Remote Service

2010-11-09 Thread Lance Nanek
I can think of no scenarios in which you need a service to run in a separate process. I've run into a scenario. Force close kills your process. So if you want to do an internet call on unhandled exceptions, doing it in another thread isn't enough. Users often hit the button before your internet