Well, I chose another way now:
I'm just looking at the compass (calibration required) and check with
a switch-case if the phone was turned. That's not the "good" approach
but it works for now and as I'm just working on a prototype that
should be fine for now. As the user is supposed to look on the screen
while using my app I don't think people would start turning the phone
but not themselves.
Thanks for your help anyway!

Cheers


On Dec 29, 4:32 pm, Frank Weiss <[email protected]> wrote:
> Using the (magnetic) compass would require less coding, I suppose. However,
> is it available on all your target devices and is it accurate enough?
>
> I should defer to someone who's actually used the compass sensor. In the
> meantime, you could put together a test app in just a few minutes. You could
> base it on the following accelerometer test 
> code:http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/
>
> On Tue, Dec 29, 2009 at 7:11 AM, Matt <[email protected]> wrote:
> > Isn't it possible to use the compass magnet to track direction?
>
> > Matt
>
> > On Dec 29, 7:07 am, Frank Weiss <[email protected]> wrote:
> > > It's doubtful you can literally tell if the person has turned around. I
> > > think you're trying to infer that, by assuming the person is holding the
> > > device a certain way in relation to his or her body..
>
> > > Perhaps by that assumption, the device moves in a 360° arc through space,
> > > not on an axis intersecting the device (simple bearing). It should be
> > > possible to track the position of the device through the arc via the
> > > accelerometer and infer the body movement you are trying to figure out.
>
> > > On Tue, Dec 29, 2009 at 2:18 AM, Moritzz <[email protected]>
> > wrote:
> > > > Okay, I came up with an idea now but I can't implement it. Basically I
> > > > need to implement sthg like a real compass. I also found an
> > > > application like that in the market: Compass. But I have no clue how
> > > > they got that thing working properly. Does anyone have some experience
> > > > with the "orientation" and "magnetic field" sensors?
>
> > > > On Dec 27, 6:40 pm, Moritzz <[email protected]> wrote:
> > > > > I'm working on an app that needsbodymovements as inputs. So
> > > > > basically I want to know if a person turns around completely (360°).
> > > > > If a the person does sthg happens inside the application. My problem
> > > > > for now is: How to figure out if a person turned around?
> > > > > I don't see an approach with gps as the person is not moving enough.
> > > > > So I thought about the compass or acceleration sensor but I have no
> > > > > clue how to manage that. I'd really appreciate some ideas / hints /
> > > > > tipps!
>
> > > > > Cheers
>
> > > > > Moritz
>
> > > > --
> > > > 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]><android-developers%2Bunsubs
> > [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]<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