These types are only available from Android 2.3 and above.
However you can use them with PhoneSensors by passing the type value (as listed here: Sensor | Android Developers).
These types are only available from Android 2.3 and above.
However you can use them with PhoneSensors by passing the type value (as listed here: Sensor | Android Developers).
I'm also trying to implement TYPE_LINEAR_ACCELERATION. I can initialize this by using sensor 10 as Erel points out above. What I'm not clear on is how I then capture the event. For the other supported sensor types I would use
sub ACCEL_Sensorchanged
Which works fine.I have tried
Sub LINEARACCEL_Sensorchanged
but this sub does not get triggered. I know I can use Sensor_SensorChanged to capture all sensor events but I need to capture this event separately or if not have a way to detect which sensor has triggered the generic event. One other point, if I add linear_acceleration to the Sensor App found here on the forum it only displays one value but I know it should be displaying all three values.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.