I have read the other window leak posts and have tried what what suggested there to no avail.
I have 3 activities: A, B, and C. Activity A gathers information from the user. Activity B displays a spinning ProgressDialog while it communicates with a server on another thread. When the thread finishes, it dismisses the ProgressDialog and starts the next activity. Activity C displays the information from the server to the user. Activity B is set up so that when the user hits back from C, they fall back to A.
It is important that these tasks be in separate Activities.
As of now the app successfully does what it is supposed to in most cases, except in the following scenario: If the user changes the orientation while in activity C before returning to Activity A, the app crashes due to a window leak.
- I am dismissing the ProgressDialog inthe onPause() of Activity B before istart C.
- I have tried dismissing the ProgressDialog on the main thread using a handler as well as in the separate thread.
- When the user does not change the orientation in C, no window leak occurs.
Any ideas? TIA