Skip to content

feat: Add periodic background bundle updates #2561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: compose-dev
Choose a base branch
from

Conversation

brosssh
Copy link
Member

@brosssh brosssh commented May 21, 2025

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 #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.
  • 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 brosssh force-pushed the feat/compose/scheduled-bundle-updates branch from 6cd95db to 81c78ef Compare May 21, 2025 10:55
@brosssh brosssh marked this pull request as draft May 21, 2025 11:10
@Ushie Ushie changed the title feat(Compose): Auto update bundles with a background task feat: Add periodic background bundle updates May 21, 2025
@Ushie
Copy link
Member

Ushie commented May 21, 2025

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

@oSumAtrIX
Copy link
Member

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

@brosssh brosssh added the ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager label May 21, 2025
@brosssh brosssh self-assigned this May 21, 2025
@brosssh
Copy link
Member Author

brosssh commented May 23, 2025

Current behavior:

Record_2025-05-23-22-50-36.mp4

@brosssh
Copy link
Member Author

brosssh commented May 23, 2025

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 brosssh force-pushed the feat/compose/scheduled-bundle-updates branch from d155c43 to 320823b Compare May 23, 2025 21:11
@Ushie
Copy link
Member

Ushie commented May 24, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReVanced Manager Compose Regarding the Compose rewrite of ReVanced Manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Request POST_NOTIFICATIONS permission in Android 13 and higher feat: Notify user about patch bundle updates
3 participants