Help with Yoik Screen Orientation (Cordova)


Hey all, I’m having trouble getting my screen to lock orientation. I’ve added screen.lockOrientation('portrait-primary') on the client and also in a Meteor.isCordova conditional, with no luck. Has anyone any experience with this Cordova plugin? Thanks.


I’ve used this code inside a Meteor.startup:

if ( Meteor.isCordova ) screen.lockOrientation('portrait');

Plugin I’m using: net.yoik.cordova.plugins.screenorientation@1.3.2


I also have it within Meteor.startup, using the same plugin version … Doesn’t seem to be working, though. I’ll deploy again and see what happens. Thanks.

EDIT: It is now working. Thanks.