openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
749 stars 362 forks source link

Android rotation lock setting is not respected #1737

Open Oxdeception opened 6 months ago

Oxdeception commented 6 months ago

Steps to Reproduce

  1. Create Lime project using SimpleImage template
  2. Set Auto-rotate screen to off on Android device
  3. lime test android
  4. Rotate device

Expected Behavior Starting orientation is maintained

Actual Behavior Orientation changes

player-03 commented 6 months ago

The documentation for ACCELEROMETER_ROTATION makes it sound like apps get to override the system setting, so maybe Lime is doing that somewhere.

Or maybe Lime uses [Display.getRotation()](https://developer.android.com/reference/android/view/Display#getRotation()) without regard to the accelerometer setting. Though since that value comes from Android, it ought to work correctly. https://github.com/openfl/lime/blob/e6205bf3aaace23c7e2458841da4435ff9879eaf/templates/android/template/app/src/main/java/org/libsdl/app/SDLActivity.java#L2053-L2095