On Wed, Mar 21, 2012 at 11:44 PM, Vivek Khandelwal <
[email protected]> wrote:

> I want my Application to show Custom Dialog When an Uncatch Exception
> occur.
>
Why?

> And Try to show the Toast.
>
> But My Toast is not Displayed because my Main Looper (i.e My Main Thread)
> is being stopped and My Whole Application get blocked.
>
Then you're doing something wrong.

> I tried to create a Alternate Main Looper when Main Looper is being
> stopped. But for some reason my Alternate Main Looper does not get Any
> Message in MessageQueue.
>
You should figure out what's blocking your main thread and stop doing that.

> What I need is to Show the Error to User and Close the Erroneous Activity,
> Not my Whole Application.
>
If you landed in UncaughtException Land, I'd recommend letting the system
kill your app off itself. Trying to recover from this situation will
probably prove to be a lot more work and effort than its worth. What if
your activity was binding to a service and you kill it off? What if another
activity was waiting for a result from that one? What if finishing your
Activity causes another exception? What if your exception came from a
Service or BroadCastReceiver and not an Activity? All for what? To show the
user a slightly better message? Is that really worth it?

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
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

Reply via email to