Lazarus

Programming => Operating Systems => Android => Topic started by: chronozphere on November 24, 2011, 10:06:08 am

Title: How to use the accelometer natively?
Post by: chronozphere on November 24, 2011, 10:06:08 am
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
Title: Re: How to use the accelometer natively?
Post by: felipemdc on November 24, 2011, 10:50:43 am
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.
Title: Re: How to use the accelometer natively?
Post by: chronozphere on November 24, 2011, 11:31:15 am
Thanks! Apparently I used the wrong queries. I'll have a look at that. :)