Incidentally, I don't know if there are other reasons for restarting activities on orientation changes, but I know one reason it's done is to allow potential layout changes to occur. You can provide layouts for both landscape and portrait. I don't know why some sort of event handler couldn't be called without restarting the entire activity...
On Mon, Feb 14, 2011 at 12:12 PM, Kevin Duffey <[email protected]> wrote: > Orientation changes restart your activity if I recall correctly. I have not > done what you are doing, but I would think that in the onPause, you'd need > some way to save the location of the audio playing, then in the onResume > after the orientation change, restart playback from that point? > > > On Mon, Feb 14, 2011 at 10:25 AM, Kevin R. Octavian < > [email protected]> wrote: > >> thx... >> >> >> On Tue, Feb 15, 2011 at 1:17 AM, TreKing <[email protected]> wrote: >> >>> On Mon, Feb 14, 2011 at 12:08 PM, Kevin R. Octavian < >>> [email protected]> wrote: >>> >>>> why it happen?? >>>> can you give me a solution for my problem?? >>>> >>> >>> Please review the documentation the Android Activity Lifecycle. >>> Understanding this should answer your questions. >>> >>> >>> ------------------------------------------------------------------------------------------------- >>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >>> transit tracking app for Android-powered devices >>> >>> -- >>> 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 >> >> >> >> >> -- >> Mobile Developer >> (Android,iphone,Blackberry,J2ME,brew,symbian) >> mobile : >> 085722945257 >> email : >> [email protected] >> [email protected] >> blog : >> kevinroctavian.wordpress.com >> >> >> -- >> 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 >> > > -- 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

