File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loosing sanity with SensorEventListener, please assist.