diff --git a/screen-orientation/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java b/screen-orientation/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java index 220db7077..5ab13215f 100644 --- a/screen-orientation/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java +++ b/screen-orientation/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java @@ -60,6 +60,7 @@ private int fromOrientationTypeToEnum(String orientationType) { case "any": return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; case "landscape": + return ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE; case "landscape-primary": return ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; case "landscape-secondary": diff --git a/screen-orientation/ios/Plugin/ScreenOrientation.swift b/screen-orientation/ios/Plugin/ScreenOrientation.swift index 149aa88d7..ba4f4e5de 100644 --- a/screen-orientation/ios/Plugin/ScreenOrientation.swift +++ b/screen-orientation/ios/Plugin/ScreenOrientation.swift @@ -84,7 +84,9 @@ public class ScreenOrientation: NSObject { switch orientationType { case "any": return UIInterfaceOrientationMask.all - case "landscape", "landscape-primary": + case "landscape": + return UIInterfaceOrientationMask.landscape + case "landscape-primary": return UIInterfaceOrientationMask.landscapeLeft case "landscape-secondary": return UIInterfaceOrientationMask.landscapeRight