Device Orientation API

Dan Staley daniel.l.staley at gmail.com
Tue Sep 8 00:57:50 CEST 2009


On Mon, Sep 7, 2009 at 6:41 PM, Denis Johnson <denis.johnson at gmail.com>wrote:

> On Tue, Sep 8, 2009 at 7:44 AM, Rui Miguel Silva Seabra<rms at ansol.org>
> wrote:
> > On Mon, Sep 07, 2009 at 09:36:21PM +0200, 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".
> >>
> >> Comments?
> >
> > I agree wholeheartedly. omnewrotate was only a way to do "rotation"
> better than
> > the alternatives, but such use of accelerometers is too shallow.
> >
> > IMHO it's better that the position is declared as sets of angles and that
> > "portrait", et all be "aliases" for certan sets of angles within a
> certain
> > tolerance, that certain listening apps would only pay attention to.
> >
> > This way, perhaps, one could mix flexibility with ease?
>
> +1
>
> Perhaps one should be able to define the sets and aliases and that a
> set does not only include one axis, so that an alias such as
> "top-left-down" are possible.
>
> Thinking further, is it likely for different apps to want to use
> different resolutions so for example mokomaze will want pretty high
> resolution but another app that starts up may request/ inject (my
> term) an additional set/alias to be reported.
>
> cheers Denis
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>

+1 for the proposed API.  I'd love a dbus message to be sent on portrait and
landscape.
Though I think you would probably need portrait, reversePortrait, landscape,
and reverseLandscape (to specify which side of the device is "up" in each
mode)

However, I tend to think that this functionality probably wouldn't be as
suited to something like mokomaze.
More for applications that just want a few different positions to be
notified on. (Like the proposed few)
Applications that need finer granularity such as Mokomaze should probably
still read the accelerometers directly.

Just my two cents though.

Thanks Mickey!
-Dan Staley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20090907/d8fe5a32/attachment.htm 


More information about the community mailing list