语言

Menu
Sites
Language
Device orientation sensor not working on device

Hello

I have recently submitted an application for Gear S2 which uses the device orientation sensor. Without the data from this sensor the application can't work properly.

My application has been rejected. In the video attached to the rejection I can see that at the start of the application there is a popup saying that device orientation is not supported. It is a check I make at the start of the application. I subscribe to the 'deviceorientation' events:

 

        window.addEventListener(
            'deviceorientation',
            onDeviceOrientation,
            false
        );
    }

 

I also check the device capabilities which are needed according to the documentation of the DeviceOrientationEvent in the Tizen SDK:

 

  • Required feature:
    • http://tizen.org/feature/sensor.accelerometer
    • http://tizen.org/feature/sensor.gyroscope
    • http://tizen.org/feature/sensor.magnetometer

tizen.systeminfo.getCapability();

 

On emulator it works fine, when I generate events using the control panel. However, it seems that on the device that the application was tested on in the Samsung Apps, this capability is not present and deviceorientation is not supported.

Does anybody know why this happens? Is it possible they have incomplete devices in the Samsung Apps test department? Could someone who owns an official Gear S2 please check if deviceorientation works?

 

Thanks

响应

4 回复
daniel kim

Hi,

According to specification of Gear S2,  it doesn't support magnetometer.

     Acc, Gyro, HRM, Barometer, Ambient light, GPS (3G only)

I would suggest you to check below link as well.

     http://www.samsung.com/global/galaxy/gear-s2/#!/spec

Regards

Palitsyna

Hello,

As far as I know, magnetometer was supported by Samsung Gear S, but it was removed from Samsung Gear S2.

Here you can find information about parameters of Gear2 - it definitely  has Accelerometer and Gyroscope, but probably doesn't have Magnetometer. http://socialcompare.com/en/review/samsung-gear-s2-3g

Maciej

Hello

Thank you for your replies. Therefore, just to confirm - it means that 'deviceorientation' is not available on Gear S2?

 

How do I detect device rotation then?

 

Cheers

AVSukhov

Hello,

You can try to use "devicemotion" event:

http://www.w3.org/TR/2011/WD-orientation-event-20111201/#devicemotion

https://developer.tizen.org/development/tutorials/web-application/w3chtml5supplementary-features/device/deviceorientation-event-specification#accelerate