I have a multi Activity application with a quit/logout button on most of the screens.
On pressing the button it shows a confirmation dialog and then sends out a 'quit' broadcast.
I have a broadcast receiver on each of the activity that simply calls the finish() activity and in the OnDestroy I unregister the receiver. The code works well in normal usage.
The issue that I am facing is if an uncaught exception pops up and a Force close happens.
After I press OK the last activity shows up. When I press the Quit/LogOut button the broadcast does not seem to be picked up by other activities.
I usually have to exit each of the activity or in some cases the 2nd time I press the Quit button the broadcast propagates through.
I am aware that I can setup the Thread.setDefaultUncaughtExceptionHandler() but,
Is there any thing that I am missing out over here?
The logcat does not show up anything.