Comment history

Versions of a comment on Built-in push notifications for Android OSS without requiring a separate app, newest first.

Current version | Edited by sodiboo
Changes
i've only ever seen apps implement their own push notifications when the backend can't support UnifiedPush, for example with Molly, which can only use UnifiedPush on primary devices; with a fallback to the "app is open right now" connection running in the background on secondary devices.Removed: or Conversations, which uses XMPP, the instant messaging protocol that predates modern push notification infrastructure, so of course it needs to be able to listen to the XMPP protocol for chatting. when the XMPP server supports it the relevant extension, it can also receive chat events over UnifiedPush, and because XMPP has this generalized real-time infrastructure anyways, Conversations also supports *being* a UnifiedPush provider.Added: or Conversations, which uses XMPP, the instant messaging protocol that predates modern push notification infrastructure, so of course it needs to be able to listen to the XMPP protocol for chatting. when the XMPP server supports the relevant extension, it can also receive chat events over UnifiedPush, and because XMPP has this generalized real-time infrastructure anyways, Conversations also supports *being* a UnifiedPush provider.> Since Fluxer already uses Gateway/WebSocket connections for real-time communication, could some of that existing infrastructure potentially be reused for background notifications on Android?
Show
none of my other apps have ever required an additional push notification app
how many other apps besides Threema do you even have that can actually send you push notifications? 'cause almost all apps definitely do require an external push provider. surely you don't have a dozen apps in the background constantly with open connections ???
I'd really prefer to avoid running more background services than necessary
that is why everything supports UnifiedPush or Firebase Cloud Messaging! it's precisely to prevent redundant background services that all compete for CPU time and battery life! it's why Android actively discourages implementing push notifications per app through its battery restrictions! it feels very odd to me for Fluxer to try and work around that. and. for what benefit? like, actually? i've only ever seen apps implement their own push notifications when the backend can't support UnifiedPush, for example with Molly, which can only use UnifiedPush on primary devices; with a fallback to the "app is open right now" connection running in the background on secondary devices. or Conversations, which uses XMPP, the instant messaging protocol that predates modern push notification infrastructure, so of course it needs to be able to listen to the XMPP protocol for chatting. when the XMPP server supports the relevant extension, it can also receive chat events over UnifiedPush, and because XMPP has this generalized real-time infrastructure anyways, Conversations also supports being a UnifiedPush provider.
Since Fluxer already uses Gateway/WebSocket connections for real-time communication, could some of that existing infrastructure potentially be reused for background notifications on Android?
absolutely! just like with XMPP. Fluxer is an instant messenger after all, and the gateway connection when the app is open is not very dissimilar to how dedicated push providers work. but consider the fact that Fluxer supports logging into multiple accounts on distinct instances. if you have five accounts, this would necessitate keeping five connections open 24/7. the power of UnifiedPush is that an app can subscribe to many channels without battery drain. it would be compelling for the Fluxer client and server to support a role similar to XMPP: a generalized real-time presence conduit. then, when logged into multiple instances, you could have all your push notifications running over one gateway instead of keeping five open in the background. but if that's supported between fluxer instances, there's no reason why it would need to stop at push notifications? i think having a way to proxy the non-push-notification Fluxer gateway events through a "home" instance would be pretty neat. this would also make "Federation v1" clients actually even remotely battery efficient, because you could listen for real-time Fluxer events on multiple instances without keeping multiple connections open. and, then it would also probably make sense to let Fluxer be a UnifiedPush provider (like Conversations); why not? people use Webhooks for arbitrary push notifications anyways, formatted as chat messages. Fluxer is already a push notification conduit; it just doesn't use WebPush for ingress.
Edited by sodiboo
Changes
> Since Fluxer already uses Gateway/WebSocket connections for real-time communication, could some of that existing infrastructure potentially be reused for background notifications on Android?Removed: absolutely! just like with XMPP. Fluxer is an instant messenger after all, and the gateway when the app is open is not architecturally too dissimilar to dedicated "push notification" providers work.Added: absolutely! just like with XMPP. Fluxer is an instant messenger after all, and the gateway connection when the app is open is not very dissimilar to how dedicated push providers work.but consider the fact that Fluxer supports logging into multiple accounts on distinct instances. if you have five accounts, this would necessitate keeping five connections open 24/7. the power of UnifiedPush is that an app can subscribe to many channels without battery drain.
Show
none of my other apps have ever required an additional push notification app
how many other apps besides Threema do you even have that can actually send you push notifications? 'cause almost all apps definitely do require an external push provider. surely you don't have a dozen apps in the background constantly with open connections ???
I'd really prefer to avoid running more background services than necessary
that is why everything supports UnifiedPush or Firebase Cloud Messaging! it's precisely to prevent redundant background services that all compete for CPU time and battery life! it's why Android actively discourages implementing push notifications per app through its battery restrictions! it feels very odd to me for Fluxer to try and work around that. and. for what benefit? like, actually? i've only ever seen apps implement their own push notifications when the backend can't support UnifiedPush, for example with Molly, which can only use UnifiedPush on primary devices; with a fallback to the "app is open right now" connection running in the background on secondary devices. or Conversations, which uses XMPP, the instant messaging protocol that predates modern push notification infrastructure, so of course it needs to be able to listen to the XMPP protocol for chatting. when the XMPP server supports it the relevant extension, it can also receive chat events over UnifiedPush, and because XMPP has this generalized real-time infrastructure anyways, Conversations also supports being a UnifiedPush provider.
Since Fluxer already uses Gateway/WebSocket connections for real-time communication, could some of that existing infrastructure potentially be reused for background notifications on Android?
absolutely! just like with XMPP. Fluxer is an instant messenger after all, and the gateway connection when the app is open is not very dissimilar to how dedicated push providers work. but consider the fact that Fluxer supports logging into multiple accounts on distinct instances. if you have five accounts, this would necessitate keeping five connections open 24/7. the power of UnifiedPush is that an app can subscribe to many channels without battery drain. it would be compelling for the Fluxer client and server to support a role similar to XMPP: a generalized real-time presence conduit. then, when logged into multiple instances, you could have all your push notifications running over one gateway instead of keeping five open in the background. but if that's supported between fluxer instances, there's no reason why it would need to stop at push notifications? i think having a way to proxy the non-push-notification Fluxer gateway events through a "home" instance would be pretty neat. this would also make "Federation v1" clients actually even remotely battery efficient, because you could listen for real-time Fluxer events on multiple instances without keeping multiple connections open. and, then it would also probably make sense to let Fluxer be a UnifiedPush provider (like Conversations); why not? people use Webhooks for arbitrary push notifications anyways, formatted as chat messages. Fluxer is already a push notification conduit; it just doesn't use WebPush for ingress.
Original by sodiboo
Show
none of my other apps have ever required an additional push notification app
how many other apps besides Threema do you even have that can actually send you push notifications? 'cause almost all apps definitely do require an external push provider. surely you don't have a dozen apps in the background constantly with open connections ???
I'd really prefer to avoid running more background services than necessary
that is why everything supports UnifiedPush or Firebase Cloud Messaging! it's precisely to prevent redundant background services that all compete for CPU time and battery life! it's why Android actively discourages implementing push notifications per app through its battery restrictions! it feels very odd to me for Fluxer to try and work around that. and. for what benefit? like, actually? i've only ever seen apps implement their own push notifications when the backend can't support UnifiedPush, for example with Molly, which can only use UnifiedPush on primary devices; with a fallback to the "app is open right now" connection running in the background on secondary devices. or Conversations, which uses XMPP, the instant messaging protocol that predates modern push notification infrastructure, so of course it needs to be able to listen to the XMPP protocol for chatting. when the XMPP server supports it the relevant extension, it can also receive chat events over UnifiedPush, and because XMPP has this generalized real-time infrastructure anyways, Conversations also supports being a UnifiedPush provider.
Since Fluxer already uses Gateway/WebSocket connections for real-time communication, could some of that existing infrastructure potentially be reused for background notifications on Android?
absolutely! just like with XMPP. Fluxer is an instant messenger after all, and the gateway when the app is open is not architecturally too dissimilar to dedicated "push notification" providers work. but consider the fact that Fluxer supports logging into multiple accounts on distinct instances. if you have five accounts, this would necessitate keeping five connections open 24/7. the power of UnifiedPush is that an app can subscribe to many channels without battery drain. it would be compelling for the Fluxer client and server to support a role similar to XMPP: a generalized real-time presence conduit. then, when logged into multiple instances, you could have all your push notifications running over one gateway instead of keeping five open in the background. but if that's supported between fluxer instances, there's no reason why it would need to stop at push notifications? i think having a way to proxy the non-push-notification Fluxer gateway events through a "home" instance would be pretty neat. this would also make "Federation v1" clients actually even remotely battery efficient, because you could listen for real-time Fluxer events on multiple instances without keeping multiple connections open. and, then it would also probably make sense to let Fluxer be a UnifiedPush provider (like Conversations); why not? people use Webhooks for arbitrary push notifications anyways, formatted as chat messages. Fluxer is already a push notification conduit; it just doesn't use WebPush for ingress.