C Cor Active Member Licensed User Longtime User Feb 24, 2011 #1 adding: TYPE_LINEAR_ACCELERATION TYPE_GRAVITY TYPE_ROTATION_VECTOR
Erel B4X founder Staff member Licensed User Longtime User Feb 24, 2011 #2 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).
L latcc Banned Dec 27, 2011 #3 Erel said: 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). Click to expand... Erel On the page you mention is the sensor type: TYPE_PRESSURE Is this actually available or just a 'wish list' type function? Are such sensors part of Android devices? I know we have a magnetic compass sensor and an orientation sensor. What else is there?
Erel said: 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). Click to expand... Erel On the page you mention is the sensor type: TYPE_PRESSURE Is this actually available or just a 'wish list' type function? Are such sensors part of Android devices? I know we have a magnetic compass sensor and an orientation sensor. What else is there?
Erel B4X founder Staff member Licensed User Longtime User Dec 27, 2011 #4 It is available. However most devices do not support it. See this thread for the available sensors: http://www.b4x.com/forum/basic4android-getting-started-tutorials/6647-orientation-accelerometer.html
It is available. However most devices do not support it. See this thread for the available sensors: http://www.b4x.com/forum/basic4android-getting-started-tutorials/6647-orientation-accelerometer.html
V vinicio Member Licensed User Longtime User Jun 8, 2013 #5 Sensors Type_linear_acceleration I hope someone can help me, I can not use the virtual sensor TYPE_LINEAR_ACCELERATION. I tried with PhoneSensors but the type is not implemented. Using the API level 17 and the app should be operated only on the Samsung S4 (which supports the sensor) Vinicio
Sensors Type_linear_acceleration I hope someone can help me, I can not use the virtual sensor TYPE_LINEAR_ACCELERATION. I tried with PhoneSensors but the type is not implemented. Using the API level 17 and the app should be operated only on the Samsung S4 (which supports the sensor) Vinicio
Erel B4X founder Staff member Licensed User Longtime User Jun 9, 2013 #6 Use 10 for the type: Sensor | Android Developers
G galeforce9 Member Licensed User Longtime User Jun 10, 2015 #7 Hello, 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. Thank you Ian
Hello, 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. Thank you Ian
Erel B4X founder Staff member Licensed User Longtime User Jun 11, 2015 #8 The event name is not related to the sensor. You pass the event name (the prefix) in the StartListening call.
The event name is not related to the sensor. You pass the event name (the prefix) in the StartListening call.