PAS wrote: > I noticed that if the orientation of the phone changes (portrait to > landscape mode), my Activity is restarted, calling onPause(), > onStop(), onStart(), and onResume(). The same thing happens when my > Activity is running and a phone call comes in. > > I would like to treat these two events differently, so is there any > way to determine the reason why onPause() was called?
Not really, no. > Even a method to get the current orientation of the phone could be > helpful as I could store it and check for a difference. From the standpoint of your activity, the orientation hasn't changed until after onPause() gets called. However, you might want to visit: http://androidguys.com/?p=2084 Ed Burnette has a comment on my blog post here that describes other ways of handling rotation beyond the default. I'm tentatively planning on writing up a post on those techniques sometime next week. It may be you could implement one of his suggestions and use that to achieve your desired goal. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 Published! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

