Hi Manish, you are welcome. You'll need to declare the flag configChanges and mention that you want to react to orientation changes. Check here: http://developer.android.com/reference/android/R.attr.html#configChanges
To understand better what's going on, pls check: http://developer.android.com/reference/android/app/Activity.html (look for the bullet: Configuration Changes) regards, Fernando On 23 fev, 23:32, Manish Garg <[email protected]> wrote: > Yes fernando. My activity is getting created at the time of > orientation change. and onPostExecute is getting called after activity > is destroyed. progress bar is independent dialog which is getting > dismiss at the time of onPostExecute. and if orientation has changed, > it is no more attached to the window manager. because of which my app > get crashed. > > Please tell me what shud i mention in the manifest file. And what shud > i do in onConfigurationChanged? In my application onCreate is getting > called at the time of orientation chnage. Can it be stopped to > rereate? what should I take care or implement to stop it. > > Thanks in advance > ~Manish > > On Feb 24, 12:00 pm, fernando <[email protected]> wrote: > > > > > > > > > It seems that your activity is being recreated on orientation changes > > because this configuration change is not declared on the manifest, and > > the post execute is called after the activity is destroyed. To check > > that, put log messages on the onCreate, onConfigurationChanged and > > onDestroy activity methods (you might need to override those functions > > and don't forget to call super implementation if so). > > Those logs along with the exception logging will say if the crash > > happened after the activity is destroyed and if it's been created > > multiple times to react to the orientation change. Hope it helps you > > investigating. Let us know > > > - Fernando > > > On Feb 23, 10:00 pm, TreKing <[email protected]> wrote: > > > > On Tue, Feb 22, 2011 at 11:58 PM, Manish Garg > > > <[email protected]>wrote: > > > > > If user change the orientation at the time of fetching and onPostExecute > > > > get called after orientation change, my application is crashing. > > > > Try this first.http://www.google.com/search?q=asynctask+orientation+change > > > > --------------------------------------------------------------------------- > > > ---------------------- > > > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > > > transit tracking app for Android-powered devices- Hide quoted text - > > > - Show quoted text - -- 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

