android - Can't view Gyro on Galaxy Tab 10 -


i installed androsensor on s3. can view sensors. when installed software on galaxy tab 10. can't view gyro sensor data. working on project need access gyro , accelerometer.

both phones have gyro-

  • in s3 have: lsm330dlc
  • in galaxy tab have: mpu 3050

android versions of phones are:

  • s3 : android os, v4.1
  • galaxy tab: android os, v4.0.3

so software not working because of android version? or because data sensors different?

why software not detecting gyro on both phones?

i suggest writing code query android's sensormanager object. example, try following

sensormanager sm = (sensormanager)getsystemservice(android.content.context.sensor_service); list<sensor> sensorlist = sm.getsensorlist(sensor.type_all); for(sensor sens : sensorlist) {     log.d("test", "name="+sens.getname()+",type="+sens.gettype()); } sensor sensorgyro = sm.getdefaultsensor(sensor.type_gyroscope); log.d("test", (sensorgyro == null ? "sensorgyro==null":"name="+sensorgyro.getname()+",type="+sensorgyro.gettype())); 

and use output work out what's going wrong. ran on galaxy note 2 , produced:

05-07 14:42:38.585: d/test(6160): name=lsm330dlc acceleration sensor,type=1 05-07 14:42:38.585: d/test(6160): name=ak8963c magnetic field sensor,type=2 05-07 14:42:38.585: d/test(6160): name=lsm330dlc gyroscope sensor,type=4 05-07 14:42:38.585: d/test(6160): name=bmp182 barometer sensor,type=6 05-07 14:42:38.585: d/test(6160): name=cm36651 proximity sensor,type=8 05-07 14:42:38.585: d/test(6160): name=cm36651 light sensor,type=5 05-07 14:42:38.585: d/test(6160): name=rotation vector sensor,type=11 05-07 14:42:38.585: d/test(6160): name=gravity sensor,type=9 05-07 14:42:38.585: d/test(6160): name=linear acceleration sensor,type=10 05-07 14:42:38.585: d/test(6160): name=orientation sensor,type=3 05-07 14:42:38.585: d/test(6160): name=corrected gyroscope sensor,type=4 05-07 14:42:38.585: d/test(6160): name=lsm330dlc gyroscope sensor,type=4 

so there appear 2 gysoscope sensors on phone.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -