Forum > Android

How to use the accelometer natively?

(1/1)

chronozphere:
Hey,

I noticed that the OpenGL example felipemdc made contained a few references to the accelometer. However, they were comments.

I've been looking but I could not find a way to access the accelometer natively. Is it possible or do I have to create my own binding via JNI if I wanted to do this?

Thanks

felipemdc:
You can access all sensors natively in Android 2.3+

Google for "android ndk accelerometer" to see C/C++ examples, then one would need to adapt them to Pascal.

chronozphere:
Thanks! Apparently I used the wrong queries. I'll have a look at that. :)

Navigation

[0] Message Index

Go to full version