문제

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 ?

도움이 되었습니까?

해결책 2

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top