After the Fragments API being released, I started porting all my deprecated dialogs into DialogFraments using the compatibility package. Everything was working well, until I notice that my dialogs are causing crashes to ICS only:
E/AndroidRuntime( 883): java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState My dialogs are shown on AsyncTask.onPostExecute() in order to show an http response to the user. After diving into the problem, I got the conclusion that this exception only happens when the Activity is paused or stopped, and it does not happen on other versions of Android. I've tried using commitAllowingStateLoss(), but it doesn't help, since the exception is thrown on DialogFragment.show(). Here's my code for the DialogFragment: http://pastebin.com/hPhPQ8Aq Is it wrong to create dialogs on paused or stopped activities? How can I assert that my activity is resumed before showing a dialog on this case? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en