This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Android and the fly likes Loosing sanity with SensorEventListener, please assist. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Loosing sanity with SensorEventListener, please assist." Watch "Loosing sanity with SensorEventListener, please assist." New topic
Author

Loosing sanity with SensorEventListener, please assist.

Stole Perov
Greenhorn

Joined: Feb 08, 2010
Posts: 12
Hello there.

My issue is as follows:

I want to create a single Class (not activity, or intent or anything...) that will implement the SensorEventListener

The problem is, that, i do not understand googles information on how to bind this class to read from the sensors on the phone.

I need to use the Orientation sensors, Azimuth, Ptich and Roll.

So far i have:


I have no idea where to go from here. I would appreciate any help (please do not refer to the googles documentation as a complete answer).
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
please do not refer to the googles documentation as a complete answer

That's where the answer is, though. The javadocs for SensorManager tell you how to get hold of a SensorManager object. Once you have that, you can use it to register your SensorListener with the OS.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loosing sanity with SensorEventListener, please assist.
 
It's not a secret anymore!