This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum 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
Register / Login


JavaRanch » Java Forums » Mobile » Android
Reply 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: 35442
    
    9
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.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Loosing sanity with SensorEventListener, please assist.
 
Similar Threads
focus of JPanel
overriding JDBCRealm
phone listener is not working properly
Instance of an abstract class
Printing to Wireless printer.