cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Field <dfi...@gmail.com>
Subject Cordova-plugin-screen-orientation on iOS
Date Sat, 25 Nov 2017 01:27:37 GMT
Hi all,

I've submitted a pull request here: https://github.com/
apache/cordova-plugin-screen-orientation/pull/24#event-1357350620 (jira
issue here: https://issues.apache.org/jira/browse/CB-13405) related to the
iOS behavior of this plugin.  The basic issue is that when the screen is
locked and then unlocked in iOS, it doesn't automatically return to the
orientation the user had before locking.  It will respond if the user
manually turns the device a few times, but it can result in the orientation
getting "stuck" in the locked position temporarily until the user starts
turning the device.

My solution is to record the position the phone is in before locking and
attempt to set the orientation back to that initial position.  This has
resulted in a better use experience in our testing for the production app I
work on.  I'm doing this in the iOS specific code because the same issue
doesn't occur on Android (at least on versions that I've tested, 6.x and
7.x).

I'd welcome any comments/reviews/feedback!

Thanks,

Dan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message