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

Call for testing: background location updates

Scheduled Pinned Locked Moved OS
28 Posts 10 Posters 5.9k Views 4 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
      mardy
      last edited by 20 May 2021, 19:05

      Hi there!
      I've been working on a few branches (you can find all the links here) to allow applications which are actively using the location service to continue running in the background, and therefore continue receiving location updates.

      If you'd like to help testing this, please run

      sudo ubports-qa install xenial_-_locationbg
      

      on your phone, then reboot, and have fun 🙂

      Please report any issues (including shortning battery life!) by adding a comment to this merge request.

      Ciao,
      Alberto

      A M 2 Replies Last reply 20 May 2021, 19:32 Reply Quote 8
      • A Offline
        AppLee @mardy
        last edited by 20 May 2021, 19:32

        @mardy
        :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands:
        Thanks a lot for your time. That's a really nice feature long awaited.

        Can you tell us more about how to test and how it works ?
        Simply because and app is using the location it won't go to sleep after timeout or shutting down the screen, is that it ?

        M 1 Reply Last reply 21 May 2021, 10:55 Reply Quote 1
        • C Offline
          cliffcoggin
          last edited by 20 May 2021, 22:03

          I too am interested in such an application. What advantage does it have over preventing suspension with UT Tweak Tool?

          1 Reply Last reply Reply Quote 0
          • M Offline
            mardy @AppLee
            last edited by 21 May 2021, 10:55

            @applee said in Call for testing: background location updates:

            Can you tell us more about how to test and how it works ?
            Simply because and app is using the location it won't go to sleep after timeout or shutting down the screen, is that it ?

            Yes. Replying to both:

            @cliffcoggin said in Call for testing: background location updates:

            I too am interested in such an application. What advantage does it have over preventing suspension with UT Tweak Tool?

            This is not an application, but a set of changes to the OS itself. It mainly consists of two parts:

            1. The location service exposes a list of the application ID which are currently receiving location updates
            2. Lomiri (new name for unity8) monitors that list, and sets the LifecycleExemption flag on those applications; the flag is removed when the application requests to stop receiving location updates.

            So, it is similar to what the UT Tweak tool does, except that this is automatic, and lasts only for as long as the application is using the GPS.

            This is just the first iteration: in the future, we would like to have it so that when an app requests access to the GPS, the user is given the choice between granting the permission to receive such updates in the background, or only when in the foreground.

            C A 2 Replies Last reply 21 May 2021, 11:15 Reply Quote 3
            • C Offline
              cliffcoggin @mardy
              last edited by 21 May 2021, 11:15

              @mardy Thanks for the explanation, but it throws up other questions. Being a change to the OS:
              [a] How will it be affected by OTA updates?
              [b] How do I revert to normal OS if the change creates problems?
              Pardon my caution, but I have little understanding of the matter or how to overcome problems.

              A 1 Reply Last reply 21 May 2021, 17:13 Reply Quote 0
              • A Offline
                AppLee @cliffcoggin
                last edited by 21 May 2021, 17:13

                Hi @cliffcoggin

                I think I'm not mistaken if I say that the goal is to test it out for it to be integrated in the OS for the upcoming OTAs.

                I see at least two easy ways to go back :

                • Switching channels
                • Using the UBports installer
                C 1 Reply Last reply 21 May 2021, 22:44 Reply Quote 0
                • A Offline
                  AppLee @mardy
                  last edited by 21 May 2021, 17:16

                  @mardy
                  Thanks for your answer, I'll install it and will try to test it out, but I'm mostly at home for the moment so not many opportunities to test the GPS.

                  Thanks again for your work.

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kugiigi
                    last edited by 21 May 2021, 17:30

                    I think one of the best app to test this is Activity Tracker. I won't be able to help with the test so I just suggested something 😄

                    1 Reply Last reply Reply Quote 1
                    • C Offline
                      cliffcoggin @AppLee
                      last edited by 21 May 2021, 22:44

                      @applee If switching channels is an easy way to restore a current OTA that is fine and I am happy to test this modification. Re-installation however is not an option for me as I have never been able to get the installer to work.

                      1 Reply Last reply Reply Quote 1
                      • C Offline
                        cliffcoggin
                        last edited by 22 May 2021, 14:29

                        I tested this today after a long struggle to copy the code from here to the terminal of my Nexus 5.

                        The test is in two parts using OSM Scout Server (with suspension enabled), Pure Maps, and Activity Tracker (with suspension enabled).

                        In the first part of the test I found that the lockscreen was prevented, consequently the display was continually on and the battery level dropped rapidly. That is something I would want to see fixed. Nevertheless the three applications mentioned all worked. I also tested that phone calls, text messages, and internet also worked. (I don't recall if the latter was using SIM or Wi-Fi.)

                        For the second part of the test I manually engaged the lockscreen with the power button. Every ten minutes I checked that the mapping continued to work, and battery levels were dropping at a more acceptable rate though I did not note any specific figures for power drop.

                        The one oddity was Activity Tracker which showed many data points while it was active, but when it was stopped and saved, only 4 data points were recorded instead of the expected 13. I don't know if that is an effect of the new software or something In Activity Tracker. It is not an application I use regularly.

                        Does this report help?

                        Cliff.

                        M 1 Reply Last reply 22 May 2021, 20:06 Reply Quote 0
                        • M Offline
                          mardy @cliffcoggin
                          last edited by 22 May 2021, 20:06

                          Thanks @cliffcoggin ! I realized just now that not all the packages made it to the PPA: the lomiri changes are not there, and they are essential to get this functionality working fine. I'm still trying to understand what is the correct branch to use for lomiri, and then I'll rebuild the package. I'll keep you guys posted!

                          For the time being, better not use this PPA, as it's incomplete.

                          C 1 Reply Last reply 22 May 2021, 23:55 Reply Quote 1
                          • C Offline
                            cliffcoggin @mardy
                            last edited by 22 May 2021, 23:55

                            @mardy OK. I will await developments.

                            To get back to stable channel I changed to RC which appeared to go well. I then tried changing back to stable channel, and it told me it was switching channels, but it remained on RC. Is that because RC is essentially the same as stable at the moment? Do I need to do anything more?

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              mardy
                              last edited by 23 May 2021, 05:09

                              OK, now the PPA seems ready 🙂

                              Please test it again, and sorry for the previous glitch!

                              C H 3 Replies Last reply 23 May 2021, 11:08 Reply Quote 1
                              • C Offline
                                cliffcoggin @mardy
                                last edited by 23 May 2021, 11:08

                                @mardy Initial indications are good. Lockscreen engages as normal, Sensor Status and Pure Maps show the correct location.

                                I'll perform a longer test next time I go out and let you know the outcome.

                                1 Reply Last reply Reply Quote 1
                                • C Offline
                                  cliffcoggin @mardy
                                  last edited by 23 May 2021, 13:53

                                  @mardy Further information: the battery level dropped from 65% to 5% in less than three hours. (I don't know the precise time as the phone turned itself off while I was away from it.) That's probably similar to what it would have been before the modification.

                                  1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    kugiigi
                                    last edited by 23 May 2021, 14:22

                                    If i remember correctly, the main issue before is that location stops working when you lock the screen even if you disable suspension. I had to stop automatic locking whenever I use Activity tracker. I was lucky Bq E5's battertly is great so I was able to use it for many hours.

                                    1 Reply Last reply Reply Quote 0
                                    • TotalRandoT Offline
                                      TotalRando
                                      last edited by 30 Jun 2021, 22:19

                                      Hey this just turned my GPS on! Thanks!


                                      Nerd with UT on a OnePlus One. OnePlus 6T waiting in the wings for VoLTE.

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        magdesign @mardy
                                        last edited by 15 Aug 2021, 18:18

                                        @mardy
                                        Thanks!
                                        After doing

                                        sudo ubports-qa install xenial_-_locationbg
                                        

                                        and rebooting my oneplus6 several times the GPS is finally working!

                                        Oneplus 6 (A6003)
                                        UBports 16.04 RC 2021-W32

                                        1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          hsce1 @mardy
                                          last edited by hsce1 30 Jan 2024, 16:41

                                          Hey @mardy, do you know if your background location service implementation has survived the transfer to focal?

                                          Edit: I guess I found the relevant MR: https://gitlab.com/ubports/development/core/lomiri/-/merge_requests/70

                                          1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            aimar
                                            last edited by 1 Feb 2024, 20:52

                                            Wow! How did I miss this feature? I have seen the last post and realize that it was available two years ago.
                                            Well, BQ E4.5 OTA 25. I have just installed it, but I am not very confident it will work. I get some errors that make me suspect:

                                            ubuntu-location-service-bin#####]
                                            W: No sandbox user '_apt' on the system, can not drop privileges
                                            E: Sub-process /usr/bin/dpkg returned an error code (1)
                                            ERROR:ubports-qa:Failed to run 'apt full-upgrade'. See the output above for details.
                                            mount: / is busy
                                            WARNING:ubports-qa:Failed to remount root filesystem read-only.
                                            WARNING:ubports-qa:Please consider rebooting your device.
                                            

                                            I have rebooted the phone. This weelend I will test the background data adquisition.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post