I have created a library that offers access to many of Androids SensorManager "Helper" functions. (I'm only using API 8, so Ive missed out a few of the newer functions and a large chunk of gravity constants.)
This library includes the facilities needed to get around the fact that TYPE_ORIENTATION is now depreciated.
I've also added crude low pass and high pass filters (both easily done in B4a, but this keeps them in one place)
I have implement Sensor.GetType() thanks to Erel, and added "_accuracychanged" event. I have included all of the PhoneSensors library in this library (mainly out of neccessity)
I have also attached an example.
Have a go and, let me know what you think.
This library includes the facilities needed to get around the fact that TYPE_ORIENTATION is now depreciated.
I've also added crude low pass and high pass filters (both easily done in B4a, but this keeps them in one place)
I have implement Sensor.GetType() thanks to Erel, and added "_accuracychanged" event. I have included all of the PhoneSensors library in this library (mainly out of neccessity)
I have also attached an example.
Have a go and, let me know what you think.
Attachments
Last edited: