Question

I'm trying to get the orientation of a Galaxy Tab by reading the informations from various sensors.

It should be possible to get the orientation with:

  • the accelerometer and the compass (magnetic field)
  • the gyroscope

The emulator has accelerometer and gyroscope enabled in config.ini, but it uses API 8 (Android 2.2). The gyroscope seems to be supported in 2.3.

When I list the available sensors, I only get the accelerometer, no gyroscope or compass.

The only solution I can think of is to switch the emulator to API 9 (2.3). Is this the only solution ?

How can NOVA from Gameloft use the gyroscope ?

Was it helpful?

Solution 2

Well... I tried on a Galaxy Tab 2.2 (and not the emulator), and the gyroscope works!

OTHER TIPS

The actual Galaxy Tab does include the necessary accelerometer and magnetic field sensors that you can use to obtain the three axis orientation of the device.

As it happens the hardware does also include a gyroscope, but because the device was launched as Android 2.2 it doesn't report the gyro values in a way that lets you use the 2.3 APIs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top