This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23072 - Interaction with DeviceOrientation/Motion
Summary: Interaction with DeviceOrientation/Motion
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Screen Orientation (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Mounir Lamouri
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 20:54 UTC by Marcos Caceres
Modified: 2014-04-03 21:10 UTC (History)
6 users (show)

See Also:


Attachments

Description Marcos Caceres 2013-08-26 20:54:39 UTC
the orientation spec should define the interaction with
DeviceOrientation/Motion.
Comment 1 Arthur Barstow 2013-10-27 12:38:17 UTC
Marcos - please provide some details on what you expect here.
Comment 2 Marcos Caceres 2013-10-28 16:46:06 UTC
Can't remember anymore. There is probably no need for clarification as they are essentially different things.
Comment 3 Lars Knudsen 2013-10-28 18:24:42 UTC
Please let me refresh your memory ;)

https://groups.google.com/d/msg/mozilla.dev.webapi/SCK80a0Oqws/aSCQrR2HnHcJ

Seriously, we need to have alignment between specs (and APIs) related to Device Motion, media queries and orientation lock.  I am speaking as a developer who have been fighting for this for years.  Unfortunately, many spec'ers are not asking real developers (TM) before finalizing.  (I know I am on the edge to being rude here - but it's very painful watching what could have been excellent improvements to the web standards getting somewhat ruined by spec'ers not interacting with actual developers before and during spec work.)
Comment 4 Marcos Caceres 2013-10-28 18:26:42 UTC
@lars, how do you suggest we can improve that interaction? What would help?
Comment 5 Lars Knudsen 2013-10-28 18:41:17 UTC
(In reply to Marcos Caceres from comment #4)
> @lars, how do you suggest we can improve that interaction? What would help?

Hi Marcos,

IM(H)O, it's important to put yourself in the place of an average Joe HTML5 developer who wants to do e.g. a game utilizing the accelerometer in the device.  Very early, he will realize that he needs to lock the device orientation in order to use the accelerometer for anything useful.  He might also have read some info on detecting which orientation the device currently is in via the media queries.  He only has one or two "portrait" devices to test on so he doesn't even know there is the concept of "landscape oriented devices" and - hence (with the currently proposed and existing apis and specs) will make something that most probably will break on a lot of units out there.  If I could go back in time, I'd push harder for a solution, where ALL devices are - per default - considered e.g. portrait orientation devices for all orientation related APIs.  Anything would then map related to this and make it VERY simple for any developer to figure out if the values should all rotate 90 degrees for a landscape oriented app/game.  

Even inside the same big mobile manufacturer company I worked until recently, different branches made different decisions on the "what is north" (portrait/ladscape) in the devices and consequently, apps behaved very differently, which was sad - because if you can't count on consistency, people will not use the APIs.

TL;DR:  Keep it simple, stick to the SAME terminology between specs/APIs and please work with some developers while the spec is still possible to change.

PS - some fun info here:  http://mobiforge.com/developing/story/html5-mobile-web-device-orientation-events
Comment 6 Dhruv Chadha 2013-10-28 19:55:55 UTC
Here is a thread that we had a couple of months back which provides details into the issue that developers face using HTML5 Device Orientation APIs. 

http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0397.html#replies 

And everyone agreed that it makes sense to link the screen orientation and device orientation spec.

We agreed on:
1. Creating a dependency between the screen and device orientation specs. 
2. Up/frame of reference is in the direction that the screen is currently locked in
3. To use device orientation, the developer must lock the screen orientation of the device.
Comment 7 Mounir Lamouri 2014-04-03 21:10:04 UTC
I have added a non-normative note. I expect the DeviceOrientation spec to do something similar:
https://dvcs.w3.org/hg/screen-orientation/rev/08c4370417da