I'm sick of having to turn on auto rotate every time I use Google Maps for navigation. I don't know why it's not just automatically landscape like apps such as Youtube.

Is there a way I can have it turn on auto rotate JUST for google maps and not for any other app.

Is there an app that would do this or somehow program it in Tasker?

up vote 22 down vote accepted

This solution requires Tasker installed and enabled. Tested on Android 4.2.1, 4.4.2, 5.0.2 and 5.1.1.

  1. Create a profile with Application → Maps
  2. Create an action under Task of the above profile as + → Display → Display AutoRotate and Set it to On.
  3. Enable Profile and Tasker.

Open Maps and orient your device in landscape mode, Maps will follow you. Close the Maps and device will fall back to Portrait.

Enjoy!


OR

Edit start: 06/06/2015

There is a way you can force the system to go into Landscape mode by changing a value in settings.db. (Tested on Android 4.2.1, root required only under this edit.)

  1. Create a profile with Application → Maps.
  2. Create an action under Task of the above profile as + → Code → Run Shell, and enter the following details:

    • Command: settings put system user_rotation 1
    • Check Use Root.
  3. Create another profile with inverse of Application → Maps.
  4. Create an action under Task of the above profile as + → Code → Run Shell, and enter the following details:

    • Command: settings put system user_rotation 0
    • Check Use Root.
  5. Enable both Profiles and Tasker.

The Maps will now automatically go into Landscape mode irrespective of manual orientation of your device. Once you close it the device will come back to Portrait mode. (Note that OP has Auto-rotation feature off so it should work.)

This edit is meant for users like me who on slow devices have to wait for the app to follow their orientation. :)

Enjoy!

OR

The shortcoming in the last method is that on some devices the app will first open in Portrait mode and then will force shift into Landscape mode. However, the app can be directly launched into Landscape mode by using an app shortcut. Tasker allows it and we'll use it.

  1. Go to your default launcher → Widgets and choose Task Shortcut.
  2. Select New task → name it.
  3. Create an action as + → Code → Run Shell, and enter the following details:

    • Command: settings put system user_rotation 1
    • Check Use Root.
  4. Create another action as +App → Launch App → select Maps.
  5. To change th icon of the shortcut, tap 3x3 square icon (at the bottom of Task Shortcut window) and choose the icon.
  6. You'll now see a shortcut with icon you selected in step 4 and name chosen in step 2.
  7. Create a profile in Tasker with inverse of Application → Maps.
  8. Create an action under Task of the above profile as + → Code → Run Shell, and enter the following details:

    • Command: settings put system user_rotation 0
    • Check Use Root.
  9. Enable both Profiles and Tasker.

Now enjoy the forced auto-mode!

Edit closed: 06/06/2015


For folks who're new to Tasker

  1. Launch Tasker. (Note that once you're done changing something in Tasker, tap Back key once. Tasker will change/close the active window and would save the settings.)
  2. Under PROFILES tab tap +Application → choose MapsNew Task→ name it something and tap right icon.

    Some Android versions might ask you to enable Tasker's accessibility service. Do it by following the instructions there and come back to Tasker.

    This step would create a profile that will be triggered whenever Maps is launched by the user.

  3. We're now under the named task (inside TASKS tab). Tap +Display → Display AutoRotate → choose On below Set.

    We're creating an action here which will be executed once the profile is triggered.

  4. Come back to main screen of the Tasker and you'll see a profile with Maps app name and marked as On.
  5. Minimize the Tasker and you'll see its icon in the Notification bar. It will say No active profile. The message will change once you launch Maps.
  6. Well, launch Maps and see the magic. You orient your device and Maps will do the same. You close the Maps and device will come back to Portrait Mode.
  7. You can always stop this behavior by disabling or deleting the profile in Tasker. You can also hide Tasker's notification icon through its settings.

Enjoy Maps now!

  • mate, this is exactly what i was after. cheers for that! – Diskdrive May 31 '15 at 12:53
  • 3
    I'm ashamed, Firelord! Usually it's me bringing Tasker in to play. This time I had a different app in mind, and Tasker users (like me) wouldn't even need that. So you definitely earned a +1 from me :) And I will see to bring my alternative answer nevertheless, as Tasker is a) not free and b) often too overwhelming for newbies ;) – Izzy May 31 '15 at 15:36
  • @Izzy Thanks! And I'm looking forward for (as always) elegant solution for everyone from you. The reason I didn't extend the Tasker steps into more details is because OP is aware of Tasker. However, this is a mistake at my part since a future reader might not be aware of Tasker's know-how. Guess, I should wrote it like this for easy following. :) – Firelord May 31 '15 at 15:42
  • No critics to you (though I agree more detailed steps might be helpful to other users, I see why they weren't required here). I was slapping my head not having thought of that :) – Izzy May 31 '15 at 15:45
  • 1
    Wow! A downvote! This answer cannot fail, so why has it received a downvote? Consider explaining please, respected downvoter. – Firelord Jan 8 '16 at 17:06

If you are rooted (and probably not using lollipop), then you can also use xposed module App Settings.

Open the module, search and open Maps and go to Orientation section and select "auto-rotate". This will force it to auto-rotate.

  • The features looks promising, but is there a way I could come to know how this module forces an app to remain in one mode? If only I can emulate this into Tasker, one can be saved from rooting, or may be the settings requires root. IDK! – Firelord May 31 '15 at 12:57
  • 1
    Sorry that would need studying its source code (which I haven't), so I cannot tell how exactly it works yet :/ Btw, here's the source code for it-> repo.xposed.info/module/de.robv.android.xposed.mods.appsettings :) – Jaskaranbir Singh May 31 '15 at 13:02
  • 1
    +1 Compared to my answer "Forced auto-rotate" is quite a deal but it kinda crashed CPU Temperature. ;) – Firelord Jul 1 '15 at 15:54

In addition to Firelord's Tasker solution (which I favor over all the others mentioned in this post – but Tasker is a) not free and b) often a bit overwhelming for newbies especially) and Jaskaranbir's App Settings (like Tasker, Xposed is often a bit too much for some), there's a third option available, called PerApp. Admitted, it has not been updated for a while, but it might be easier to use. Before JellyBean (<4.1), it doesn't even require root to adjust screen rotation. Has several other settings covered as well, so you might wish to give it a look.

  • It is precisely because many such apps aren't updated since 2013, I asked OP for his device and Android version so that fine recommendation could come into answers. Guess, OP is happy with Tasker by now. :)// That said, can I force an app in landscape mode through Tasker? I looked at AndroidManifest.xml of Maps but IDT I saw anything useful. – Firelord May 31 '15 at 15:48
  • 1
    I'm aware that the OP favorizes the Tasker-solution (as do I). My answer was just an addition for future visitors looking for "something easy" :) And no, I didn't play with orientation stuff in Tasker, so I cannot say. Be welcome to check my Tasker resource collection, there might be some how-to or addon available :) – Izzy May 31 '15 at 15:54
  • PerApp didn't work for me (Android Marshmallow) – marmor Nov 30 '16 at 7:09

You can use an app called Set Orientation by "Eyes-Free Project". It dose not require root and can force any app to rotate to any orientation and also only landscape and landscape reverse based on sensor. Its lightweight and also free. It is available in Google Play Store.

Edit: Use Rotation - Orientation Manager instead by "Pranav Pandey". It is fully compatable with Lollipop, is free and does not require root. This app also has per app settings which the previous app did not have.

  • +1. "Set Orientation" doesn't meet the requirement of the question because it enforces orientation system-wide . On the other hand, "Rotation - Orientation manager" does the job well for per-app basis. However, it wasn't smooth on my device (old device) but gets the job done. – Firelord Jun 6 '15 at 0:38

Most automation apps can probably do this. Here's a "Flow" for Automate (free): http://llamalab.com/automate/community/flows/408

MacroDroid's free version can also do the job, though I still prefer the solution using Tasker.

  1. Install and launch MacroDroid.
  2. Tap Add Macro → Application Launcher/Closed → Application Launched → OK → select your app(s) for auto-rotate → OK.
  3. Under Add Actions, tap Auto Rotate On/Off → Auto Rotate OnOK → proceed.
  4. Ignore Add Constraints → proceed and name the macro as Auto Rotate On.
  5. Create another macro using Add Macro → Application Launcher/Closed → Application Closed → OK → select your app(s) which you chose in step 2 → OK.
  6. Under Add Actions, tap Auto Rotate On/Off → Auto Rotate Off → OK → proceed.
  7. Ignore Add Constraints → proceed and name the macro as Auto Rotate Off.

That's it. The funtionality is achieved and you can test it by launching and closing the app(s) you selected in aforesaid steps.

AutomateIt's free version also does the job.

  1. Install and launch AutomateIt.
  2. Under My Rules block, tap Add Rule → Applications Status Trigger → under Application tap the lens icons and choose your app(s) → Next.
  3. Under Action tab, tap Enable/Disable Screen Rotation → Enable Screen Rotation → Next → No → save the rule.
  4. Create another rule from My Rules block by tapping Add Rule → Applications Status Trigger → under Application tap the lens icons and choose your app(s) → uncheck Application ActivatedNext.
  5. Under Action tab, tap Enable/Disable Screen Rotation → Disable Screen Rotation → No → save the rule.

That's it. The funtionality is achieved and you can test it by launching and closing the app(s) you selected in aforesaid steps.

And Tasker even allows you to add conditional's such as if my display is such do this else do whatever. So based on that I came up with my own solution which may seem a bit convoluted but it works for me. Since my device is not rooted the shell code commands that require root would not work anyway.

However with a if else loop (it could be reduced further since I had added some additional debugging code initially) you can simply set AutoRotate based on the value of Orientation. So you store those two values in two variables called ROTATE and DISPLAY and at the start of the if loop you check DISPLAY using a regular expression (I had to do that because for whatever reason the orientation value kept jumping between landscape and landscape-reverse so this regex takes care of both):

%DISPLAY ~R landscape(.*)?

If that is your desired setting then in that if or else loop you can set AutoRotate to Off. In addition I also installed a Tasker plugin called AutoInput which allows me to lock down the home and back buttons, to exit I can press the other button which brings up all my open windows and simply close the Adobe Acrobat app which is the trigger for this task.

So a big Yay!! for Tasker. And yes I know I am a bit late to the party but oh well :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.