Unless somethings changed very recently, I don't believe the AOSP versions of the default apps have the correct manifest attributes to actually use the sensor. (i.e. they are missing the android:screenOrientation="sensor" annotation - in fact I just looked at launcher and it specifies nosensor. Browser does not specify anything about the sensors).
You have to modify the manifests appropriately yourself. Craig On Sep 20, 2:37 am, Dianne Hackborn <[email protected]> wrote: > Android has done this since 1.0. As long as your sensors are working (and > that means reporting good data up through the Java APIs) and you haven't > done anything to turn off rotation (such as reporting a lid open and > configuring that to force a particular rotation), then it will automatically > rotate based on sensors. Prior to Froyo there are two rotations supported; > as of Froyo 3 are supported (everything except upside down). > > > > On Sun, Sep 19, 2010 at 7:04 PM, G2 <[email protected]> wrote: > > Hello, > > > I wrote a separated thread during the summer about this but I start a > > new one as it has been messed up with another discussion. > > > We are trying to add rotation of screen based on accelerometer in our > > Android eclair 2.1 device. Kernel driver is working fine and I have > > eventually developed an Android hal sensors driver (based on hardware/ > > libhardware/modules/sensors/). > > > For instance, the application: > > >http://www.ibm.com/developerworks/opensource/library/os-android-senso... > > reports correctly the acceleration (not the orientation) of the > > device. > > > So my naive question is: what now? Where is some support for screen > > rotation in Android? For instance, is the browser or the launcher > > supposed to rotate (landscape/portrait) depending of the screen > > position? In which Android version? Is there any patch (http:// > >www.koushikdutta.com/2008/12/auto-rotate-for-android-browser.html) to > > do this? > > > Thanks for any clarification, > > > Grégoire > > > -- > > unsubscribe: > > [email protected]<android-porting%[email protected]> > > website:http://groups.google.com/group/android-porting > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
