Using Sensor like Accelerometer and Magnetic sensor in Android

Hello, I have been banging my head since last 4 to 5 days in order to get a good example of how to use Android Sensors in JME. Can anyone please paste me latest working link or example or anything that can help me in accomplishing this task. I need a lead… I have tried everything available but of no help and I have got more confused. Help please!

Have a look at my framework called Galago.
I have a custom AndroidActivity that does a lot of things. Just look at the Sensor stuff.

2 Likes

Hello ndebruyn. I had a look into your code. I wanted a clarification… If we want to use Android Sensors then do we need to code only in mobile project…? Can we not use the same thing in any class extending SimpleApplication?

I am having a look at your project and using your library in my project and will look if I get any further.

Well @gaurav.dubey99 you have to have the sensor code in the AndroidActivity but can callback to the SimpleApplication to get the event.