Ionic 3 screenOrientation.lock not working

#1

Hi,

my screen orientation is not working on android device.

modal.ts

    this.screenOrientation.unlock();
    this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);

#2

On config.xml file put this code

 <preference name="orientation" value="portrait" />

And build again