Device Orientation API

Michael 'Mickey' Lauer mickey at vanille-media.de
Wed Sep 9 14:55:53 CEST 2009


On Wednesday 09 September 2009 13:23:55 Nils Faerber wrote:
> Michael 'Mickey' Lauer schrieb:
> > Hi folks,
> >
> > 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.freesm
> >artphone.Device.Orientation.html;hb=HEAD
> >
> > Basically, it's sending you a string whenever the orientation changes.
> > Valid substrings contain "portrait", "landscape", "faceup", "facedown".
> >
> > Comments?
>
> Sind it will for sure be supposed to become an general interface I would
> suggest not to use names which can be confusing (if landscape is the
> native orientation it becomes messy) but rather use degrees, i.e.
> 	"45", "90", "180", "270"
>
> Which represent the number of degrees turned from native device
> orientation.

Hmm, good point. Let me think about this.

:M:






More information about the community mailing list