语言

Menu
Sites
Language
A new web Api -device orientation?

I'm not sure but it seems for z1  2.3. Tizen  is  a new API

 Is this right - instead of 1 we now have to write 2?

 

DeviceOrientation Event Specification (Partial) 1 Provides access to orientation and acceleration data. The method and event currently not supported are:
  • initAccelerometerEvent of DeviceMotionEvent interface
  • compassneedscalibration event
  •     Required feature:
    • http://tizen.org/feature/sensor.accelerometer
    • http://tizen.org/feature/sensor.gyroscope
    • http://tizen.org/feature/sensor.magnetometer

响应

24 回复
AVSukhov

Hello,

As i known, there is not any change in W3C Device Orientation API from Tizen SDK 2.2.0

Second paragraph appeared in the documentation in SDK 2.2.1

Feature declaration can be used for application filtering in the Tizen Store. Tizen Store filters the applications that are visible to users, so that users can see and download only those applications that are compatible with their devices. 

And on devices that do not support this feature, will not be available this application.

This is analog <uses-feature>  in Android.

 

Kilim A

Hello
1. my app was rejected defect id 2379934

The Sprite do not make deviceorientation event.

I do  not know why. Previous version of this app ( i do not change deviceorientation part) - worked fine, tizen store accepted the app .


May be  it's help some privileges, but is not need for deviceorientation events add features ( only for filter how you have said)
A new Required feature:
◦http://tizen.org/feature/sensor.accelerometer
◦http://tizen.org/feature/sensor.gyroscope
◦http://tizen.org/feature/sensor.magnetometer

Something change, i  can understand what is it?


2. In Application Screening Result Report Support wrote:
Recommendation Issues - [Defect]
The application contains an incomplete URL (http://www.mozilla.com/firefox/)
But it is just verification of browser


Need i remove all of them?

 Support Team ask me make some  questions here...

Marco Buettner

Have you fixed your orientation on the config.xml?

Kilim A

What do you mean? Tell plz
 

Kilim A

Do you mean Portrait Or Landscape? In my file there are portrait mode - and it is right for my app...

Sprite simply do not moving, but early version worked fine

And on RD-PQ ( 2.2.2) - all works fine

AVSukhov

Hello,

I have tested "deviceorientation" event on device with Tizen 2.3 and i have not good news: "deviceorientation" event and "devicemotion" (DeviceRotationRate interface) event isn`t worked on Tizen 2.3.

On Tizen 2.2.1 all works fine.

 

Kilim A

I express my gratitude for your  this work!
  Because I had this question and problem in the several tops.
  Why anyone have not said about it before? support team does not know about it ...
Maybe there is another method, an alternative?

 Becouse  i can't  test on 2.3 Tizen

 

Is it temperal or not?

Release nothing talk about this change

AVSukhov

Hello,

I am investigating it. Release Notes has no info about any changes on this API. Documentation isn`t changed.

I will verify bugs.tizen.org, may be similar issue was submitted.

Also, on Gear S works fine.

 

Kilim A

On RD-PQ 2.3.0  "deviceorientation" events works but not works right

Kilim A

sorry for much of posts - comments can not be edit

Release 2.3:

Sensor

  • Starting and stopping receiving acceleration, gravity, gyroscope, humidity, light, magnetic, orientation, pressure, proximity, and temperature sensor data.
  • Getting and setting sensor options.

 

I hope it is temporarily...

AVSukhov

Hello,

I have submitted new issue on bugs.tizen.org https://bugs.tizen.org/jira/browse/TM-3

will check for updates.

daniel kim

Hi,

This is the sensor specification of Samsung Z1.


Compass/ Magnetometer  No 
Proximity sensor  No 
Accelerometer  Yes 
Ambient light sensor  No 
Gyroscope  No 
Barometer  No 
Temperature sensor  No 

http://gadgets.ndtv.com/samsung-z1-2309

As Z1 doesn't support Gyroscope and magnetometer, DeviceOrientation event doesn't triggered.
But DeviceMotion event is available as it support Accelerometer.

Hope this will help you.

 

Marco Buettner

I played on the early morning with the DeviceOrientation on RD-PQ and I cannot confirm the "bug". I tested it with SystemInfo and TizenWinSet, and it works perfect for me.

On SystemInfo you have a section called "DeviceOrientation". If you turn your device to the left or right, the type will change from "PORTRAIT_PRIMARY" to "LANDSCAPE_PRIMARY" or "LANDSCAPE_SECONDARY", but the UI is fixed on "PORTRAIT_PRIMARY".

To change the UI, you need to setup (like I wrote in this topic above) the config.xml.

config.xml -> Tizen -> Rotation -> Auto-Rotation

AVSukhov

Hi Marco,

If i understand correctly, Sofya has a problem with accelerometer sensor.

Data from accelerometer sensor can be obtained using Device Orientation Event Web API:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.web.appprogramming/html/guide/w3c_guide/device_guide/device_orientation_event.htm

This API on Tizen implemented using DeviceOrientationEvent W3C specification:

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

F.e. this API using in Compass sample app (from IDE). Try to launch this app on device with Tizen 2.3 and Tizen 2.2.1

 

Your example using another api (SystemInfo API) and its works fine.

Kilim A

Yes I use (alpha, beta, gamma) for control  the moving sprite for game.

 How i can understand SystemInfo can not be used for game.

AVSukhov

Hello,

I have checked documentation and tech spec for Tizen 2.3 and Z1 device and the following conclusions:

1. According tech spec http://gadgets.ndtv.com/samsung-z1-2309

Z1 device support only accelerometer sensor

2. Acording Dev Guide "deviceorientation" event tracking data from gyroscop/magnetometer sensor. And these sensors are not supported on Z1 device.

3. "devicemotion" event tracking data from accelerometer sensor. And this sensor is supported on Z1 device.

 

I think you need rewrite your app to using "devicemotion" event.

Example using this event you can find in IDE -> SensorBall Sample

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.web.appprogramming/html/tutorials/w3c_tutorial/device_tutorial/task_sensorball.htm

 

I hope this helps you.

Kilim A

How i can understand we must use devicemotion instead deviceorientation.

You bring me the Example..

But Sensor Ball using DeviceOrientation Api...

 

 

Task: Sensor Ball

This tutorial, based on the SensorBall sample delivered with the Tizen SDK, demonstrates how you can use the W3C DeviceOrientation Event API to read and process gyro sensor data. For more information on the sample functionality and creating the sample with the full source code, see the SensorBall Sample Overview.

This tutorial consists of the following parts:

This sample is a fully functional application which uses the gyro sensor to create a game where the game elements move on the screen based on the sensor data.

Where to Go Next

AVSukhov

Hello,

SensorBall app using "devicemotion" event instead "deviceorientation"

DeviceOrientation Event Specification provides several events: "deviceorientation", "devicemotion" and "compassneedscalibration"

All these events are part of DeviceOrientation API but receive data from different sensors.

 

AVSukhov

Hello,

According bugs.tizen.org (https://bugs.tizen.org/jira/browse/TM-3) This is a problem with sensor:

"deviceorientation" event using Gyroscope sensor, but Z1 device does not support it.

Kilim A

I see the problem with DO is intended to solve with next tizen mob version, is it?

Marco Buettner

It can not be solved on the Z1 because the Z1 has no Gyroscope sensor, which is used for deviceOrientation. You should use deviceMotion, which use the data from the accel. sensor

AVSukhov

Hello,

Z1 device does`t support Gyroscope senor on hardware level.

Marco rights, unfortunately you'll have to rewrite your app using "devicemotion" event.

Kilim A

How i  can test Device Motion

 RD-PQ  is supporting it?

 

Marco Buettner

Yes, it should also supporting DeviceOrientation