Device Orientation API

Stefan Schmidt stefan at openmoko.org
Wed Sep 9 16:50:26 CEST 2009


Hello.

On Wed, 2009-09-09 at 16:32, Helge Hafting wrote:
> Michael 'Mickey' Lauer wrote:
> > 
> > I'm sketching a simple device orientation API for FSO. The purpose is to be 
> > informed about changes in the physical device orientation. My first take is at 
> > http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Device.Orientation.html;hb=HEAD
> > 
> > Basically, it's sending you a string whenever the orientation changes. Valid 
> > substrings contain "portrait", "landscape", "faceup", "facedown".
> 
> Good idea.
> I assume orientation changes is only reported to apps that actually ask 
> for them? So that the accelerometers can be turned off to save power 
> whenever no apps happen to be interested.

Yup, that is what the resource system in FSO handles. Power up devices only if
apps request them and save power when nothing uses them.

regards
Stefan Schmidt



More information about the community mailing list