Elektrine lite

← Feed

@dalias@hachyderm.io

Post #2768159

2023-12-12 16:27 UTC

@ck@chaos.social That's not true at all. For example see the ConnectBot ssh client, which keeps ssh connections open in the background just fine. There is no "VM", but there is nasty auto-killing which you either need to suppress via an explicit backgrounding action (which shows a persistent notification unless the user opts to hide it) or you need to tell the user to disable "battery optimization" (actually pessimization) for your app and deal with the fairly rare remaining bg kills.

Replies (1)

  • @ck@chaos.social 2023-12-12 16:42

    @dalias@hachyderm.io Precisely, the background action is used to keep the socket alive because the app will not be sent to sleep (battery optimized). This is also what Signal does for their websocket connection which is used to listen for push notifications. The thing is that this background notification is not free in terms of battery usage. Using a service like FCM to wake up you app would safe on this background service, thus saving on battery.

    Open ##2768160