Few questions about Ubuntu Touch
-
I just... don't understand how some things work.
Looks like this is the most relevant place for such questions here on the forum.-
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 runkdialog --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? -
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?
-
-
@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.
-
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)?
-
-
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.
-
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.
-
-
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.
-
@vasya said in Few questions about Ubuntu Touch:
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.
-
@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.
-
@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.
-
@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... -
@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.
-
@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
-
@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.
-
@kugiigi yep, exactly Guitartools