On Sep 30, 8:13 am, Matteo <[email protected]> wrote: > > Are you referring to Thread#setDefaultUncaughtExceptionHandler()?
> If i launch "n" Activities i'll always have the same thread , in this > scenario i will need to call setDefaultUncaughtExceptionHandler only > once per application right ? It's global to a process. How that matches up with activities and applications is up to the app framework. Activities can be created/ destroyed multiple times within a single process, so you have to be a little careful about how you manage this. If you're trying to do this when an activity is created: have a static "has been initialized" member variable; if it's false, get the current default uncaught exception handler and save it away. Set yours. When your handler is called, do the processing, and then call the original (unless you really don't want the default behavior). The default behavior provided by the Android app framework is to log the exception, ask the system to show a useful message in a dialog, and then kill the process. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

