revanced-manager icon indicating copy to clipboard operation
revanced-manager copied to clipboard

feat: Add periodic background bundle updates

Open brosssh opened this issue 7 months ago • 5 comments

This is still WIP, but I open the PR to both get feedback and to keep track of what I'm doing.

Feature:

Basically what is described here https://github.com/ReVanced/revanced-manager/issues/2189: A scheduled job will run each X time (choosable by the user); it will check if an update is available for every remote bundle. A bundle can be excluded by deselecting the "Search for updates" toggle in the bundle settings. If an update was found, send a push notification (if permission were granted, else do not run the job).

Edit: I've removed the TODO list since it would contains too many item now, I've made too many changes :^). I'll provide a video explaining what I did.

Open points:

  • [ ] My devices will force close the app when swiping the app away from the recent app menu. Force closing the app will stop every background task. Pretty sure there is nothing that can be done, but if anyone knows a way for the job to run even of force close please let me know.
  • [x] ~~Does it still make sense to have the auto update on app opening? Should that send a notification as well if it updates a bundle?~~ Edit: Yes. The bundles are going to be updated still on app opening, while the search will be in the background

Any feedback is appreciated :).

brosssh avatar May 21 '25 10:05 brosssh

I feel like time options less than a day shouldn't be available, as it would encourage users to immediately update when updates drop

Wouldn't this be better if it were push notifications instead? The patch bundle source would be needed to host something but it would prevent the ReVanced Manager from having to poll for updates so frequently if we're going to include such little times

Ushie avatar May 21 '25 13:05 Ushie

Push notifications requires some kind of web socket server from what I understand. Poll works fine thanks to Cloudflare caching as well as the /version response which is small

oSumAtrIX avatar May 21 '25 13:05 oSumAtrIX

Current behavior:

https://github.com/user-attachments/assets/7493074d-eacf-4cc9-93e0-a5dc12484e25

brosssh avatar May 23 '25 21:05 brosssh

I feel like time options less than a day shouldn't be available, as it would encourage users to immediately update when updates drop

Time options and strings shown to the user can (and should) be adjusted. For now the time options are like this because it's easier for me to understand if the job is running correctly.

brosssh avatar May 23 '25 21:05 brosssh

If the user doesn't wish to be notified of the bundle update then no background polling should happen, the bundles should be updated on app launch in that case

Ushie avatar May 24 '25 11:05 Ushie