skipTrackLongPressVolume
skipTrackLongPressVolume copied to clipboard
Idea: disable battery optimization to run without a foreground service
There is a documented way to bypass "battery optimization" as they call it by asking the user to whitelist the app. Supposedly, this allows apps to run regular, non-foreground services indefinitely. I haven't tested this myself, but Google's own Android Wear app uses this to run the service that communicates with the watch.
Thank you for that idea. I'm working on it
Supposedly, this allows apps to run regular, non-foreground services indefinitely.
Do you have any more information about that? The linked documentation only points out WakeLocks... Anybody ones to work on this please see the background_optimization branch.
This may be helpful? https://github.com/alexstyl/Memento-Calendar/issues/151#issuecomment-326736192
Otherwise you can check on the dev branch where I have put a power exclude setting(However it's kotlin)
Thank you @indianpoptart. I will have a look on that!
Yeah I saw your code. Actually I edited that in the background_optimization branch by removing the NotificationListenerService
but since then the execution in the background does not work any longer.
If you wanna test it yourself make sure the Activity is removed from the recent apps.
I'll definitely test the background branch and see if it changes anything, or if I can find a solution.
Cheers!
Maybe the DeviceAdminService is a better alternative but I'm not 100% sure about that...