# Android Auto-Rotate Disabled Not Respected with Discourse PWA

**URL:** https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396
**Category:** Bug
**Created:** [12.Октябрь.2018 19:32:29 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396 "2018-10-12T19:32:29Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![abass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abass/32/113486_2.png) [@abass](https://meta.discourse.org/u/abass)
#### Post date: [12.Октябрь.2018 19:32:29 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/1 "2018-10-12T19:32:29Z")

</div>

This only happens with Discourse after you “add to homepage” (creating a Progressive Web App), once added, they don’t respect Auto-Rotate settings and keep rotating even when the setting is disabled on Android.

It’s incredibly frustrating since I always have “auto-rotate” turned off and it’s constantly switching between landscape and portrait view, especially when laying down on the couch or in bed on Discourse communities (Asana, Airtable, this community, etc.).

Edit: Video showing issue compared to non-Discourse PWA - [https://photos.app.goo.gl/MZRm8gCMQS2AfJWP6](https://photos.app.goo.gl/MZRm8gCMQS2AfJWP6)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12.Октябрь.2018 20:28:10 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/2 "2018-10-12T20:28:10Z")

</div>

> [@abass](#):
>
> This only happens with Discourse after you “add to homepage” (creating a Progressive Web App), once added, they don’t respect Auto-Rotate settings and keep rotating even when the setting is disabled on Android.

Sounds like a problem with Android. The obvious solution is to just use your browser that works instead of the one that doesn’t. It’s unclear whether this can be solved on the Discourse side.

---

<div class="post-metadata">

### Author: ![abass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abass/32/113486_2.png) [@abass](https://meta.discourse.org/u/abass)
#### Post date: [12.Октябрь.2018 20:31:31 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/3 "2018-10-12T20:31:31Z")

</div>

> [@pfaffman](#):
>
> Sounds like a problem with Android

That’s what I thought at first, but it is **only** happening with Discourse PWA’s, not happening with any other PWA’s we have set up and are using which brought me back to guessing it’s an issue with Discourse.

I rely incredibly heavily on the PWA’s for Discourse, jumping into each community from the home screen so simply just “using chrome directly” isn’t easy and a painful “workaround”.

I wouldn’t have posted in this community if I wasn’t fairly sure that it’s a Discourse issue moreso than an Android issue.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [12.Октябрь.2018 20:35:13 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/4 "2018-10-12T20:35:13Z")

</div>

> [@abass](#):
>
> I wouldn’t have posted in this community if I wasn’t fairly sure that it’s a Discourse issue moreso than an Android issue.

I’ve seen a similar report before, but I don’t remember it being so well-described.

---

<div class="post-metadata">

### Author: ![abass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abass/32/113486_2.png) [@abass](https://meta.discourse.org/u/abass)
#### Post date: [12.Октябрь.2018 20:43:33 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/5 "2018-10-12T20:43:33Z")

</div>

> [@pfaffman](#):
>
> but I don’t remember it being so well-described.

Here’s a video showing off the issue. As you can see, the only PWA that I open which respects screen-lock is the non-Discourse forum. You can see specifically when I visit the non-Discourse PWA for the 2nd time, the bottom-right corner shows the Android Pie screen-lock override control, whereas all of the Discourse forums just automatically rotate and it’s incredibly jarring 😅

> **[New video · Friday, Oct 12, 2018 🎬](https://photos.google.com/share/AF1QipP6NNrc7ir8zIEVvgKgy0LUbaZfaxdgtO3pdPStS_rO-p4yEeJ-Op2K_sdKF4TV2A?key=TGE1eUx1SmQ3ODZwMWNJNWxGY1F2ajF6eC1mRlJ3)**

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [12.Октябрь.2018 20:44:46 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/6 "2018-10-12T20:44:46Z")

</div>

We had this enabled and people complained, as I recall. You can check with @Falco

---

<div class="post-metadata">

### Author: ![abass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abass/32/113486_2.png) [@abass](https://meta.discourse.org/u/abass)
#### Post date: [12.Октябрь.2018 20:51:18 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/7 "2018-10-12T20:51:18Z")

</div>

Thanks for the reply!

> [@codinghorror](#):
>
> We had this enabled and people complained

When you say that you had this enabled, what exactly did you have enabled? I’d assume that auto-rotate would be controlled by Android at a system-level across the board, why should a specific site be able to override it? If you take a look at the video I attached, you can see how jarring it is to the end-user. Discourse specifically is ignoring the auto-rotate setting.

And with Android Pie, they make it so easy to switch to landscape mode to temporarily override your auto-rotate setting by prompting you in the bottom-right corner:

 ![Screenshot_20181012-165212](https://global.discourse-cdn.com/meta/original/3X/e/0/e06a41f13403807ed48cf97d515094455f6f9cf0.png)

So those who want to switch to landscape when they have auto-rotate turned off get the best of both worlds when just letting the system control this functionality.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12.Октябрь.2018 20:52:09 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/8 "2018-10-12T20:52:09Z")

</div>

Нашёл последний ответ @Falco:

> [@Locking Android orientation to portrait?](https://meta.discourse.org/t/locking-android-orientation-to-portrait/92872/10?u=jomaxro):
>
> We used to lock rotation when you used the Add to Home screen on Android and got complaints from users. So we don’t do that anymore. If you want to lock rotation use the OS option on the quick settings tile.

Он говорит, что нужно использовать опцию ОС для отключения поворота. Отчёт здесь (который я могу воспроизвести) говорит о том, что опция ОС не учитывается. Мне это кажется #Contribute > Bug.

@codinghorror, кажется, ты вспоминаешь всё в обратном порядке.

---

<div class="post-metadata">

### Author: ![abass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abass/32/113486_2.png) [@abass](https://meta.discourse.org/u/abass)
#### Post date: [12.Октябрь.2018 20:55:08 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/9 "2018-10-12T20:55:08Z")

</div>

> [@jomaxro](#):
>
> Он говорит использовать опцию ОС для остановки вращения. Отчёт здесь (который я могу воспроизвести) гласит, что опция ОС не учитывается. Мне это кажется багом #Contribute > Bug.

Вы абсолютно правы 👌👌. Прочитав ответ @Falco, я понял, как это должно работать, и могу понять, почему люди жалуются — именно это меня недавно бесило больше всего. Независимо от того, включена у меня автоповорот или выключена, Discourse всегда ведёт себя так, будто автоповорот включён. Он полностью игнорирует настройку быстрого доступа Android, которая, как советовали, должна была остановить постоянное вращение. Это явно баг.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [12.Октябрь.2018 22:54:42 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/11 "2018-10-12T22:54:42Z")

</div>

The actual last response is:

> [@Manifest orientation property](https://meta.discourse.org/t/manifest-orientation-property/94900/3):
>
> At first it was portrait and people asked for any in the link OP provided. Then we got [a PR](https://github.com/discourse/discourse/pull/4703) changing to natural. Then we [got complaints](https://forum.quartertothree.com/t/suggestions-for-future-improvements-to-our-forum-software/129744/469) and changed back to any. man_shrugging We can certainly do this. Let me research a bit and get back to you.

What is the orientation value you think we should use this time?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12.Октябрь.2018 22:59:14 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/12 "2018-10-12T22:59:14Z")

</div>

Whoops, sorry for finding the wrong post @Falco. Looks like you did remember correctly @codinghorror, apologies!

In my mind the correct value is whatever one respects the OS setting. If I have rotation lock on, the app shouldn’t be rotating. If I have auto-rotate on, the app should rotate like the OS does. Given that Android 9 supports locking the device in landscape, this will (hopefully) make everyone happy.

Side note, the Discourse Hub app functions as I just described above - it respects the OS.

---

<div class="post-metadata">

### Author: ![abass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abass/32/113486_2.png) [@abass](https://meta.discourse.org/u/abass)
#### Post date: [12.Октябрь.2018 23:24:03 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/13 "2018-10-12T23:24:03Z")

</div>

> [@jomaxro](#):
>
> In my mind the correct value is whatever one respects the OS setting. If I have rotation lock on, the app shouldn’t be rotating. If I have auto-rotate on, the app should rotate like the OS does.
> 
> Side note, the Discourse Hub app functions as I just described above - it respects the OS.

This is exactly how I feel as well.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [13.Октябрь.2018 02:31:30 UTC](https://meta.discourse.org/t/android-auto-rotate-disabled-not-respected-with-discourse-pwa/99396/14 "2018-10-13T02:31:30Z")

</div>

Duplicate
