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

Few questions about Ubuntu Touch

Scheduled Pinned Locked Moved General
13 Posts 5 Posters 1.1k 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.
    • V Offline
      vasya
      last edited by 28 Dec 2020, 21:58

      I just... don't understand how some things work.
      Looks like this is the most relevant place for such questions here on the forum.

      1. Push notifications.
        If I understand it correctly, a notification has to go through the UBports push notifications server along with the token identifying the device that notification should be delivered to. Why so complicated? When I run kdialog --title "Hello world" --passivepopup "Foo bar" on my desktop, I don't need to obtain any token and send it back and forth, so why is it impossible for an app to just send some notification event directly to mir socket or something like that?

      2. Gui apps running inside libertine containers.
        Well, they perform veeery poor, at least on (my) Nexus 5. Is that OK? Will it get better if I attach an external monitor, or is it because of xmir?
        By the way, as far as I know, xmir is abandoned, but mir is wayland-compatible now, so why even use xmir instead of xwayland which is still supported, or even use wayland directly where possible?

      F K 2 Replies Last reply 28 Dec 2020, 23:11 Reply Quote 0
      • F Offline
        flohack @vasya
        last edited by 28 Dec 2020, 23:11

        @vasya I can answer number 1:

        • Its perfectly okay for an app to send a local push notification. But services like Telegram or Matrix will send notifications from their servers directly to our push server, when the app is suspended. This is mostly to save power and network bandwidth.

        We do the same here as iOS and Android, to minimize the resource usage for notifications, otherwise most clients would need to poll their servers, creating much more data and energy consumption.

        For example, a local notification is generated when you receive an SMS, battery is low, calendar reminder etc. Those will enver leave the device ofc.

        My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

        V 1 Reply Last reply 28 Dec 2020, 23:35 Reply Quote 0
        • V Offline
          vasya @flohack
          last edited by 28 Dec 2020, 23:35

          @flohack

          otherwise most clients would need to poll their servers

          Well I don't think they'll actually have to poll it since stuff like real-time messengers is mostly websocket-based nowadays.

          So, your push server is not something that app developers are forced to use in order to be able to send notifications, right? That is, can I write a Telegram client that will not depend on your notification server (while still being able to use notifications ofc)?

          F 1 Reply Last reply 29 Dec 2020, 14:52 Reply Quote 0
          • K Online
            kugiigi @vasya
            last edited by 29 Dec 2020, 02:33

            @vasya

            1. I think you're comparing the push notification to a local notification? Apps are suspended when in the background on UT so you can't trigger notifications in this state, at least for now that background services aren't implemented yet. I am not really familiar with the technicalities of push notifications but I think how it works on UT is the same as how it works on iOS and Android, as also said by Florian. I don't think the same thing is implemented in desktop Linux distros which you are comparing it to.

            2. Yes xmir runs libertine apps and yes xmir isn't maintained anymore and it's bad. Wayland/xwayland will be the future of but it will take time to be implemented on all devices. Currently, it's only being used on the Pine devices which still doesn't work well at the moment. Further development is needed to completely moved from mirclient to wayland. You can check this forum here on what is needed.

            V 1 Reply Last reply 29 Dec 2020, 07:26 Reply Quote 0
            • V Offline
              vasya @kugiigi
              last edited by 29 Dec 2020, 07:26

              @kugiigi

              Apps are suspended when in the background on UT so you can't trigger notifications in this state

              Lol. Recently I tried to play music in the background and now I understand why it didn't work. That's a pity.
              Are there currently any known plans on implementing those background services you're talking about?

              2

              Оkay, I'll check it out, thank you.

              L K 2 Replies Last reply 29 Dec 2020, 09:56 Reply Quote 0
              • L Offline
                libremax @vasya
                last edited by 29 Dec 2020, 09:56

                @vasya said in Few questions about Ubuntu Touch:

                @kugiigi

                Apps are suspended when in the background on UT so you can't trigger notifications in this state

                Lol. Recently I tried to play music in the background and now I understand why it didn't work. That's a pity.

                With UT Tweak Tool you can set if an app need or not to be suspended when in background.

                Donate anonymously 1€/$ by year to UBports, all Ubuntu Touch users can do it ! Demonstration:
                https://forums.ubports.com/topic/1262/donate-anonymously-1-by-year-to-ubports-all-ubuntu-touch-users-can-do-it-demonstration/

                1 Reply Last reply Reply Quote 0
                • F Offline
                  flohack @vasya
                  last edited by 29 Dec 2020, 14:52

                  @vasya No you are not forced, but your app is suspended when not in foreground, or display is switched off, thats by design, and its really "engraved" in the whole App system, so its hard to change. For example Dekko, the email client, consists of a daemon and a GUI frontend, and the daemon runs in the background and polls your mailboxes.

                  But, it needs to run as unconfined App, so it has access to much more than it needs, to not go to sleep. We need a policy "background activity" and from this policy onwards we need to rework kinda stuff in the app management to allow such things as you described. Its somewhere on the list, but not on high prio.

                  My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                  1 Reply Last reply Reply Quote 0
                  • K Online
                    kugiigi @vasya
                    last edited by 29 Dec 2020, 14:58

                    @vasya Actually, there's a background service for media playback called the mediahub but not all apps uses it and the browser doesn't use it as well. There are plans for background services, and I think someone already have a prototype for location service which might also be used on other services. Also, there's a PR for morph to support web notifications but it's still in draft status.

                    V 1 Reply Last reply 30 Dec 2020, 21:19 Reply Quote 0
                    • V Offline
                      VollaTom @kugiigi
                      last edited by 30 Dec 2020, 21:19

                      @kugiigi hi, that's nice to hear! I can contribute another undesired implication of lacking adjustable background services.
                      I'm using a metronome very often on UT. Everytime the display is going down, the metronome stops working! Running the metronome with an always-on display is pure battery drainage...

                      K 1 Reply Last reply 31 Dec 2020, 03:01 Reply Quote 0
                      • K Online
                        kugiigi @VollaTom
                        last edited by 31 Dec 2020, 03:01

                        @vollatom Try to ask that app's developer to use media hub then so the audio will continue to play even with the display off.

                        V 1 Reply Last reply 31 Dec 2020, 13:24 Reply Quote 0
                        • V Offline
                          VollaTom @kugiigi
                          last edited by 31 Dec 2020, 13:24

                          @kugiigi Ok, thanks! Just for the sake of reporting on this issue:
                          It seems that UT-Tweak-Tool is offering some basic control of background services (per app), but that doesn't work at least for the metronome app! Didn't try it with another app for now.

                          Regards

                          K 1 Reply Last reply 31 Dec 2020, 13:34 Reply Quote 0
                          • K Online
                            kugiigi @VollaTom
                            last edited by kugiigi 31 Dec 2020, 13:34

                            @vollatom Not really background services. It just exempts apps from the normal app lifecycle which is suspension when not in the foreground. Usually that works for continuing playback. Which app is this? I can try on my devices.

                            UDPATE: Are you using Guitar Tools? Because I tried it and it seems that the app intentionally stops the playback when the app goes out of focus. So that includes, open the app drawer and indicators. So I guess you can ask the developer to disable it or at least an option.

                            V 1 Reply Last reply 31 Dec 2020, 17:22 Reply Quote 0
                            • V Offline
                              VollaTom @kugiigi
                              last edited by 31 Dec 2020, 17:22

                              @kugiigi yep, exactly Guitartools

                              1 Reply Last reply Reply Quote 0
                              3 out of 13
                              • First post
                                3/13
                                Last post