You can set the orientation of the app in your manifest using
android:screenOrientation on your activity element.

That will hard-code it to rotate to landscape or portrait by default,
then just use SENSOR_DELAY_UI when creating the handler as I think
that's the slowest and uses the least battery.

Maybe you can switch between landscape and portrait by modifying the
activity since it's exposed in the xml it is probably exposed in the
api too.

Adam

On Sep 18, 10:59 pm, San Zhang <[email protected]> wrote:
> I known it can be disabled by Settings. My meaning is if there are APIs to
> manage rotate screen on system level but not my app only.
>
> 2010/9/19 Dianne Hackborn <[email protected]>
>
> > On Fri, Sep 17, 2010 at 5:17 PM, San Zhang <[email protected]> wrote:
>
> >> 2. Accelerometer consumed power greatly.
>
> > The power needed for the accelerometer is trivial next to the power needed
> > for the screen.
>
> > --
> > 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.
>
> > --
> > 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]<android-developers%[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

Reply via email to