I want to write a application which should open in default orientation of the device and should not change the orientation with device rotation or slide-out keyboard opening/closing (if present). i.e. I want to set the orientation of the application as portrait when the default orientation of the Android device is portrait. And landscape when the default orientation of the Android device is landscape.
To achieve this i will be using setRequestedOrientation method with portrait and landscape as the arguments. On any given device, i need to determine which of these two argument should be passed to the setRequestedOrientation metthod and for the same i need to have some mechanism to determine default orientation of the device. One way is to keep database of Android devices and their default orientation, but it is not a feasible option considering the number of Android devices that will be hitting the market. On Mar 21, 5:39 pm, Mark Murphy <[email protected]> wrote: > neha wrote: > > How can i get the default orientation of a Android device. > > There is no such concept in Android, AFAIK. > > What is the business problem you are trying to solve? > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Development Wiki:http://wiki.andmob.org -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

