• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Rotation lock for specific apps

Scheduled Pinned Locked Moved General
rotation lock
22 Posts 5 Posters 5.0k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mihael
      last edited by 8 Sept 2018, 06:27

      I would like my Phone app not to rotate - every time when I try to end a call I have to chase the red button as the screen rotates sometimes even a few times after I remove the device away from my ear. Is there such a possibbility? If not, are other people interested in this feature? Can this be done in-app, in Settings or in a third app like UT Tweak Tool?

      D 1 Reply Last reply 8 Sept 2018, 08:06 Reply Quote 0
      • D Offline
        doniks @mihael
        last edited by 8 Sept 2018, 08:06

        @mihael said in Rotation lock for specific apps:

        I would like my Phone app not to rotate - every time when I try to end a call I have to chase the red button as the screen rotates sometimes even a few times after I remove the device away from my ear.

        If you have to chase the button, that sounds like an issue.

        I wanted to say, maybe it's because you hold the device more or less horizontal and then just by tilting it a little it turns. But I just checked on my Nexus 7 and I have to tilt it approximately 30 degrees to make it turn. If anything, I think my device is not rotating enough and not too much!

        Do you have rapid rotations in other situations as well or just when ending a call? How are you holding your device when it does it? Are you bringing it down from an upright-next-to-the-ear-position down to almost-horizontal? Or more like using a headset and pulling the device out of your trouser pocket where it was head down to have the headphone jack on top? Does the behaviour change with different angles/ positions?

        Is there such a possibbility? If not, are other people interested in this feature? Can this be done in-app, in Settings or in a third app like UT Tweak Tool?

        Just to get it out of the way first: You know there is a rotation lock for the phone in the top drawer? But I assume you want to control it per app, so then that doesn't help.

        You can hack the supported orientations on a per app basis. If I remember it right it's in the .desktop file in ~/.local/share/application or so. There can be a X-Ubuntu-Supported-Orientations= which can have a comma separated list of portrait,in-verted-portrait,landscape,inverted-landscape (all from memory, could be spelled differently). I don't think there is any tool to help with short of an editor.

        M 1 Reply Last reply 8 Sept 2018, 08:47 Reply Quote 1
        • M Offline
          mihael @doniks
          last edited by 8 Sept 2018, 08:47

          @doniks Thank you, that is great suggestion to edit the .desktop file. It's just that I don't find the specific file for the phone app. Could you help me with the location of that file?

          Yes, it happens after I take the phone away from my ear. So from a diagonal (maybe horizontal) postion, I try to get it to vertical so that with one hand (the left one) I could hit call end button with my thumb. But instead of the app just to rotate to the portrait view, it does sometimes few more rotations - as if in my switch from landscape to portrait I flipped the phone on the back and all the rotations must be executed in order. It looks like I phisically rotate the phone faster than the rotation of the display is executed. So, if the sensors recorded several rotations (I guess because inertia) then all the rotations must be displayed. In the end it lands on portrait view but it does this "dance" sometimes.

          My device: Pro 5 (turbo).

          D 1 Reply Last reply 8 Sept 2018, 09:26 Reply Quote 1
          • D Offline
            doniks @mihael
            last edited by 8 Sept 2018, 09:26

            @mihael said in Rotation lock for specific apps:

            @doniks Thank you, that is great suggestion to edit the .desktop file. It's just that I don't find the specific file for the phone app. Could you help me with the location of that file?

            $ tail /usr/share/applications/dialer-app.desktop
            Icon=/usr/share/dialer-app/assets/dialer-app.png
            MimeType=x-scheme-handler/contact;x-scheme-handler/call
            X-Ubuntu-Touch=true
            X-Ubuntu-StageHint=SideStage
            X-Ubuntu-Single-Instance=true
            X-Ubuntu-Default-Department-ID=accessories
            X-Ubuntu-Splash-Show-Header=true
            X-Screenshot=/usr/share/dialer-app/assets/dialer-app-screenshot.png
            X-Ubuntu-Supported-Orientations=portrait
            

            I can't figure out how to make it portrait and inverted though. I'm sure this worked like that at some point, but I can't figure it out now: https://wiki.ubuntuusers.de/Baustelle/Ubuntu_Touch/Snippets/#User-Interface-Rotation

            Yes, it happens after I take the phone away from my ear. So from a diagonal (maybe horizontal) postion, I try to get it to vertical so that with one hand (the left one) I could hit call end button with my thumb. But instead of the app just to rotate to the portrait view, it does sometimes few more rotations - as if in my switch from landscape to portrait I flipped the phone on the back and all the rotations must be executed in order. It looks like I phisically rotate the phone faster than the rotation of the display is executed. So, if the sensors recorded several rotations (I guess because inertia) then all the rotations must be displayed. In the end it lands on portrait view but it does this "dance" sometimes.

            My device: Pro 5 (turbo).

            I think you should file an issue

            M 1 Reply Last reply 8 Sept 2018, 09:28 Reply Quote 0
            • M Offline
              mihael @doniks
              last edited by 8 Sept 2018, 09:28

              @doniks Again. Thank you.

              Regarding filing an issue, I wanted first to know if other users are affected by this.

              D 1 Reply Last reply 8 Sept 2018, 09:29 Reply Quote 0
              • D Offline
                doniks @mihael
                last edited by 8 Sept 2018, 09:29

                @mihael said in Rotation lock for specific apps:

                @doniks Again. Thank you.

                Regarding filing an issue, I wanted first to know if other users are affected by this.

                Good point. I don't have a sim card, so I'm not affected 🙂

                A 1 Reply Last reply 8 Sept 2018, 09:33 Reply Quote 0
                • A Offline
                  advocatux @doniks
                  last edited by 8 Sept 2018, 09:33

                  @doniks hmm I wonder if we should keep in mind this portrait only behaviour for other phone apps (v.g. SIP ones)

                  D 1 Reply Last reply 8 Sept 2018, 09:49 Reply Quote 0
                  • D Offline
                    doniks @advocatux
                    last edited by doniks 9 Aug 2018, 09:51 8 Sept 2018, 09:49

                    @advocatux said in Rotation lock for specific apps:

                    @doniks hmm I wonder if we should keep in mind this portrait only behaviour for other phone apps (v.g. SIP ones)

                    Well, not for me please. I do want to be able to use apps in portrait. But I admit that I'm biased, because I use a Nexus 7 (7 inch tablet) which I hold landscape most of the times. Apps that force an orientation break my user experience. This was very painful for me a few years ago before Canonical improved the rotation support. I don't have a UT phone, but I think I would also like to be able to use a UT phone in landscape. I know that I suffer from Androids inability to provide a proper rotation experience.

                    I think, forcing portrait is a nice hack for @mihael's problem. But the actual bug is: "Too rapid rotations". I don't think "force portrait" is an apropriate fix for this. It's more a workaround that throws away a bunch of valid use cases. The device should do The Right Thing (tm) also with a SIP dialer and that is: Give me a good user experience on multiple form factors and orientations.

                    Btw, can you reproduce the too rapid rotation behaviour that @mihael observes?

                    A L 2 Replies Last reply 8 Sept 2018, 09:58 Reply Quote 0
                    • A Offline
                      advocatux @doniks
                      last edited by 8 Sept 2018, 09:58

                      @doniks yes, I agree with you of course. I was just thinking out loud and I should have explain myself better 🙂

                      After some quick tests, it seems I don't have that quick rotation problem. My Nexus 5 (xenial rc) rotates 'normal' from what I can tell, but I'll keep an eye on that.

                      D 1 Reply Last reply 8 Sept 2018, 10:01 Reply Quote 0
                      • D Offline
                        doniks @advocatux
                        last edited by 8 Sept 2018, 10:01

                        @advocatux said in Rotation lock for specific apps:

                        @doniks yes, I agree with you of course. I was just thinking out loud and I should have explain myself better 🙂

                        No worries. These things need to be discussed! I don't think it's obvious what is the right thing with many of these converging use cases. That's why UT is the best in class. Because it's hard 🙂

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          mihael
                          last edited by 8 Sept 2018, 10:12

                          @doniks In /usr/share/dialer-app/dialer-app.qml there is a automaticOrientation: false setting - so it is set to false...

                          D 1 Reply Last reply 8 Sept 2018, 10:22 Reply Quote 0
                          • L Offline
                            Lakotaubp @doniks
                            last edited by 8 Sept 2018, 10:21

                            @doniks As very quick aside what version if Ubports are you on the nexus 7. Mine defaults to portrait oonce the unlock code us entered and does not go back.Mine us 16.04 rc. Think oughts the tablet not Ubports side want ti check. Thanks

                            D 1 Reply Last reply 8 Sept 2018, 10:33 Reply Quote 0
                            • D Offline
                              doniks @mihael
                              last edited by 8 Sept 2018, 10:22

                              @mihael said in Rotation lock for specific apps:

                              @doniks In /usr/share/dialer-app/dialer-app.qml there is a automaticOrientation: false setting - so it is set to false...

                              What does that mean? I don't get it.

                              M 1 Reply Last reply 8 Sept 2018, 10:23 Reply Quote 0
                              • M Offline
                                mihael @doniks
                                last edited by 8 Sept 2018, 10:23

                                @doniks It means that is the only thing I found in dialer-app files about orientation but it is already set to false...

                                D 1 Reply Last reply 8 Sept 2018, 10:27 Reply Quote 0
                                • D Offline
                                  doniks @mihael
                                  last edited by 8 Sept 2018, 10:27

                                  @mihael I'm still not following. Did the X-Ubuntu-Supported-Orientations not work? Are you looking for another workaround? Is it rotating now with automaticOrientation: false? Or not? Which values in the desktop file?

                                  I'm lost where we are right now and what we're talking about ...

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    doniks @Lakotaubp
                                    last edited by 8 Sept 2018, 10:33

                                    @lakotaubp said in Rotation lock for specific apps:

                                    @doniks As very quick aside what version if Ubports are you on the nexus 7. Mine defaults to portrait oonce the unlock code us entered and does not go back.Mine us 16.04 rc. Think oughts the tablet not Ubports side want ti check. Thanks

                                    Well, I have the images from ubports server for Nexus 7 gsm (deb!). 16.04, not sure now which channel (devel? rc?), haven't updated for a few weeks and I'm "between laptops" so I can't easily check and it's ... a ... bit ... uhm ... an adventurous installation 🙂 because: https://github.com/ubports/ubuntu-touch/issues/643 However, it rotates every which way I want it to. (Except the login screen, but I think that rotates for no one). Happy to discuss further, but then let's jump into a separate thread shall we.

                                    L 1 Reply Last reply 8 Sept 2018, 10:53 Reply Quote 0
                                    • L Offline
                                      Lakotaubp @doniks
                                      last edited by 8 Sept 2018, 10:53

                                      @doniks Yes sounds great. Working most of the day so will start one later in the support section when free.

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        mihael
                                        last edited by 8 Sept 2018, 13:38

                                        @doniks Sorry for not being more specific and thank you for your patience.

                                        I didn't modify anything. The setting that I described is as I found it and I thought that if it is already set to false, there is no point in me setting it to true since what I want is that the app would not change orientation automatically.

                                        D 1 Reply Last reply 8 Sept 2018, 13:48 Reply Quote 0
                                        • D Offline
                                          doniks @mihael
                                          last edited by 8 Sept 2018, 13:48

                                          @mihael ah, ok. understood. But, well, I don't know whether or what that variable does. I'm not really familiar with the dialer source code

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            dobey
                                            last edited by 9 Sept 2018, 13:09

                                            As dialer-app already has automaticOrientation set to false, and specifies only portrait as supported orientation in the .desktop file, it should not be rotating at all.

                                            This is a bug. An extremely complex new feature, such as locking rotation configurations at app level granularity, is not the right fix.

                                            Is there an open issue about this problem? If not, please report the issue in github.

                                            M D 2 Replies Last reply 9 Sept 2018, 20:54 Reply Quote 0
                                            6 out of 22
                                            • First post
                                              6/22
                                              Last post