Search code examples
androidandroid-emulatorandroid-gpsautorotateandroid-automotive

Rotating Emulator Window while replaying Location Routes


ive noticed that the window of my Android Emulator will rotate while im replaying a route from the Emulator Menu.

  • The window rotation matches the bearing of the GPS signal.
  • Ive confirmed this is happening with all of the emulators that are custom built, but not with those in Android Studio

Emulator with Route

How do i keep this from happening?


Solution

  • I found a solution to disable the unwanted rotation of the emulator. To do this, open the config.ini file located in the emulator’s directory. You can find this file by going to the Device Manager, selecting the desired emulator, clicking on Options, and then choosing Show on Disk. In the config.ini file, change hw.accelerometer = yes to hw.accelerometer = no. After restarting Android Studio, the emulator will stop rotating when starting a route.