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

    App suspend behavour

    Scheduled Pinned Locked Moved OS
    14 Posts 6 Posters 1.7k Views 3 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.
      • H Offline
        htc_tattoo
        last edited by

        Multitasking is not the best feature on the phone yet. When i open different apps (browser, telegram, SMS (yes, i still use it), dialer, calculator, email, system settings) for daily, use i can't switch flawless between them.
        Especially the browser refuses to work and reloads the startingpage every time i access it. (very bad)
        The other apps sometimes surprisingly work still after one day, sometimes they hang and reload after seconds.
        I didn't find a pattern for this.
        As this is part of the look and feel of the system i wanted to discuss this...

        LakotaubpL D L 3 Replies Last reply Reply Quote 0
        • dobeyD Offline
          dobey
          last edited by

          It's not quite clear from your post what exactly you're complaint is, or what you are expecting. Could you perhaps elaborate to clarify? Maybe post a video showing what you think is "very bad" here?

          I've just tried opening many apps on my Nexus 4, and it's a fairly smooth experience switching between them. What device are you on?

          1 Reply Last reply Reply Quote 0
          • LakotaubpL Offline
            Lakotaubp @htc_tattoo
            last edited by

            @htc_tattoo If you just want to stop an app suspending the ever useful UT Tweak Tool can do that.

            dobeyD 1 Reply Last reply Reply Quote 0
            • dobeyD Offline
              dobey @Lakotaubp
              last edited by

              @lakotaubp Though, if the complaint is about "flawless" switching, I pretty strongly suspect it's not the app suspension that's the issue.

              LakotaubpL 1 Reply Last reply Reply Quote 0
              • LakotaubpL Offline
                Lakotaubp @dobey
                last edited by

                @dobey You may well be right. Just thought it worth a mention it all helps

                G 1 Reply Last reply Reply Quote 0
                • G Offline
                  guru @Lakotaubp
                  last edited by

                  In this context: When you start in the terminal-app any process, as test you can use sleep 600, and you swipe to some other app or suspend the phone, this process receives SIGSTOP. Why?

                  dobeyD 1 Reply Last reply Reply Quote 0
                  • dobeyD Offline
                    dobey @guru
                    last edited by

                    @guru Because Terminal app is bound by the application lifecycle policy, and thus so is any child process of the Terminal app. When an app is placed in the background it is sent SIGSTOP after a few seconds, and when brought back to foreground, is sent SIGCONT.

                    However, the special case of the Terminal (as you run CLI tools inside it) is different from apps that do not have user-directed child processes. It's also not something which would itself cause the presumed issues from the OP here.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      doniks @htc_tattoo
                      last edited by

                      @htc_tattoo one thing I struggled with multitasking on ut was about background tasks being killed and having to restart when I switch back to them. For example switching between browser and email to check something while writing the mail. this https://forum.xda-developers.com/ubuntu-touch/help/stopping-ut-killing-apps-t3424764 is my workaround for that. Im not sure this is the best solution, especially for the lifetime of my storage, but so far it works for me

                      dobeyD 1 Reply Last reply Reply Quote 0
                      • dobeyD Offline
                        dobey @doniks
                        last edited by

                        @doniks The best solution would be to fix memory usage and similar issues, across the board. Are there open issues for these cases? The best start to a solution, is to first document the problem. Then we can fix bugs and optimize code to perform better on lower end devices.

                        D 1 Reply Last reply Reply Quote 1
                        • D Offline
                          doniks @dobey
                          last edited by

                          @dobey I agree. It's just that I didn't actually hear many people talk about this. Then I wasn't sure whether maybe it's Nexus 7 specific, and then the 'deb' was never really supported by anyone, and I don't have the impression that I can make a very crisp root cause analysis and it's probably quite intertwined and .... ok, I could also stop making excuses and just check the bugtracker and write an issue as best as I can ... let me try that instead 😛

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            doniks
                            last edited by doniks

                            Ah, but seriously: I remember now one of my thoughts, which actually kept me from writing the issue: I'm not sure whether I have an issue about memory consumption. I don't even really have an issue about the killing of background apps.

                            Functionally, what I care about is: I want to switch back and forth between browser and email client. I want to do this repeatedly and step by step write an email while looking up things in the browser. Or vice versa: I want to write a forum post, while I repeatedly refer back to some emails, or maybe an attachment there.

                            I am sure that with the current installation, this workflow doesn't work out of the box, because the background apps are killed, which in turn is because I'm running out of memory.

                            I could imagine that a waste of memory is at fault. That might be the OS, or any of my open apps.

                            Or it could be that we are doing the best with the memory, but there just ain't enough memory. And actually the apps should do a better job of saving their state (which email draft were you working on, what is the scroll position that you where at, where was the cursor positioned, what was the qml page stack underneath you). But maybe the toolkit needs to actually support such "rich state saving". And maybe the OS needs to do a better job at restarting apps faster and having a higher resolution screenshot stored such that the time-to-restart is covered a little better.

                            Or it could be that we simply don't want to bother supporting devices with less than X memory, so it's a wontfix.

                            So, there we go, practical question: Do I raise the functional issue "Bad user experience switching between browser and email client", or do I raise the technical issue: "No fluent multitasking due to high memory consumption" ?

                            1 Reply Last reply Reply Quote 0
                            • dobeyD Offline
                              dobey
                              last edited by

                              @doniks said in App suspend behavour:

                              So, there we go, practical question: Do I raise the functional issue "Bad user experience switching between browser and email client", or do I raise the technical issue: "No fluent multitasking due to high memory consumption" ?

                              Well, the issue is with only those two apps open, one will get killed due to memory, right? That is an issue, or rather, probably multiple issues. I can tell you for certain we are not doing the beset with the memory. There are many optimizations that could be made across the system, and in apps. If I understand correctly how Dekko is implemented, there is almost certainly many places it could be improved.

                              As for the second part, it's probably more directly in apps. Even if apps get killed, they really need to handle saving state properly when they get paused as you move them into background, and restoring properly when starting in the event they did get killed. Session management is a feature that most app devs tend to traditionally not implement, simply because they think it's too hard, and they don't think it's necessary on traditional systems (despite it being a possible feature for decades). I'm not sure how much easier we can make it to implement, from a toolkit/SDK perspective though. That's something I'll have to think about a bit more.

                              1 Reply Last reply Reply Quote 0
                              • H Offline
                                htc_tattoo
                                last edited by

                                I tried to find a pattern to reproduce this issue. But there is none. The best way is to restart the phone, open the browser + uapp-explorer+youtube-app. Load something and begin switching. Mostly it works in the actual RC channel well, then something starts hanging which makes the browser restart and reload the startpage.
                                Same thing happens with browser+N5-camera that crashes. Email i didnt test since dekko2 has problems.
                                I also saw with systemsettings., but not often.
                                Could be an out of memory issue, but i could not trigger it...

                                1 Reply Last reply Reply Quote 0
                                • L Offline
                                  L-00117 Banned @htc_tattoo
                                  last edited by

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post