screen.orientation not working

screen.orientation not working

Hi,

I am trying to use  https://github.com/apache/cordova-plugin-screen-orientation in my app but it's not working and no error..

I tried:

  1. screen.orientation.unlock();
  2. screen.orientation.lock('landscape');

but:

  1. alert("Orientation type is " + screen.orientation.type);

is working and showing the orientation type so it's installed succesfully but then why it's not changing the orientation of the device?

Thanks,
Jassim