You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Claudiu Chirilov (JIRA)" <ji...@apache.org> on 2016/11/16 18:22:58 UTC
[jira] [Commented] (CB-11363) Screen Orientation plugin does not
work on Android 6
[ https://issues.apache.org/jira/browse/CB-11363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15671204#comment-15671204 ]
Claudiu Chirilov commented on CB-11363:
---------------------------------------
Hi,
Indeed, it doesn't work on Android 6.0 by default when trying to lock orientation. Throughout my tests, I've discovered that *window.screen* is an empty object.
That is, a workaround for this one was to get the *window.orientation* value (which is an integer representing the degree of rotation) and using a _switch(){}_ I came up to strings, such as "portrait-primary", "landscape-primary" , etc.
For more information check the plugin's source.
Hope this helps.
> Screen Orientation plugin does not work on Android 6
> ----------------------------------------------------
>
> Key: CB-11363
> URL: https://issues.apache.org/jira/browse/CB-11363
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Screen Orientation
> Affects Versions: 1.4.2
> Reporter: Tony Homer
> Labels: triaged
>
> Migrated from [Issue #112|https://github.com/gbenvenuti/cordova-plugin-screen-orientation/issues/112]
> From [vukasin0|https://github.com/vukasin0]:
> {quote}
> Is this tested on Android 6 ?
> Currently this works as expected on Android 5.x but not on 6.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org