top | item 22307462

(no title)

BubuIIC | 6 years ago

Author here (of that post and the framework).

The solution to the background limitations for now is running as a foreground service. This shows a persistent notification (which can be hidden by the user) but can then run indefinitely. The other option is to integrate this at the system level (via a custom rom, root, magisk, etc.).

> I'm curious to know if anyone is using this framework in the wild.

The client side implementation of this is still WiP, so it's not used yet in the wild. I hope to be at a point where I can work with some apps on integrating it there in the next few months.

discuss

order

smichel17|6 years ago

Maintainer of Red Moon, a screen filter app, here. I've struggled with similar problems as others describe for a long time.

As far as I know, the only truly 100% reliable way to never be killed is to run as an accessibility service. I haven't implemented this in Red Moon but will likely add it as an option. I believe it has a large impact on bettery life.

You can also set alarms using AlarmManager to restart the service if it has been killed, and optionally wake up the device. This is what DNS66 does.

UncleSam|6 years ago

This might have changed since, but in 2017 LastPass had to work with Google to update how they run their app. Google introduced "a new policy restricting the use of Android Accessibility Services" [1]

I'd look into that before starting that implementation.

[1] https://blog.lastpass.com/2017/11/lastpass-android-accessibi...

Leo_Verto|6 years ago

I've been a happy user of Red Moon for years, thank you for building it and publishing it on F-Droid!

ISO-morphism|6 years ago

I love using Red Moon and really appreciate that it's on F-Droid. Thank you!

yonixw|6 years ago

> but can then run indefinitely

Just bought a Xiaomi Redmi Note 7 and it kills everything including foreground services with a notification.

A simple user still can allow it but it will require some tech knowledge to follow instruction that are described here: https://www.reddit.com/r/Xiaomi/comments/amcck5/miui_10_keep...

qmmmur|6 years ago

I found the easy fix was to flash another rom. I fought against that OS for way too long.

ForHackernews|6 years ago

Have you looked at integration with microg, yet? https://microg.org/ It seems like a natural candidate wanting a replacement of GCM/FCM.

DanCarvajal|6 years ago

> (which can be hidden by the user)

I wish this was more obvious to people. Had to use my retire parent's phone to long into Netflix for them and it was overflowing with of persistent notifications.

aabbcc1241|6 years ago

look forward to get access from a cordova plugin