Thank For you replies.

@TreKing

My Application is Database Oriented in which Each Activity handle the Data 
of its own.

When an error occurs i want only my Current Activity which got the Error to 
close and To show a Message to User with some Error Code and Description 
which help us to find the solution for the error.

The Reason why the Application is blocked is because the Main 
Looper(Thread) started by Android Environment is being killed because of 
error. 

Android Environment is successfully restarting the Main Looper Thread when 
a Error occur but when I add an uncaughtException then i need to restart 
the Main Looper by Android Native, I cannot start that.

So I have created one Alternate Main Looper which will be started 
after uncaughtException

*public class AlternateMainLooper extends Thread {*

* *
* @Override*
* public void run() {*
* Thread.currentThread().setName("Alternate Main Looper");*
* *
* **Looper.prepareMainLooper();*
* *
* Looper.loop();** *
* }*
* *
* }*


But that does not solve the Problem. The Alternate Looper does not get any 
message in Queue. 

@mcterry

I have Tried your solution but the Toast is not Displayed and the 
Application is still blocked.



*Things i Known not Sure is it True*
Android perform all its operation using The Message Queue in Main Looper. 
So if my Main Looper gets stopped and messages will not be handled. I think 
the Main Looper is not but the UI Thread which helps me to start an 
Activity, service, handle Touch events and many more.
For that reason i decided to create Main Looper after Thread.
My All other Thread are still active after The Error. Only Main Looper is 
close. (Found when Debugging)
I may not be sure please correct me if i am wrong.

*My Objective*

User start with Activity A. and go to Activity B through A. 

Similarly From B - > C, C -> D, D -> E

When an Error occur in E. I want only Activity E to be closed with a 
Message.

But What happens is my Application is Restarted to Activity A (After 
showing a Force Closed Dialog).

In this case use may have to go From A - > D again.

And is not easy to go there to Activity D because My application is 
Database Oriented. He need to find a particular entry in Activities to go 
next Activity.


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