You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.
Hello, developers! There's a problem with update processes after minimizing application. Don't you consider using Foreground Services for that kind of work? It would allow resume any update process after returning to app's window. For now it's just freezing at 100% and we have to restart update.
I'm pretty sure you know how implement it, but I can help if you don't.
Additional Information
Because sometimes download process takes a lot of time. It's weird to just wait and do nothing while downloading.
Additional checks
I have checked other feature requests and this is not a duplicate.
This is a suggestion for Vanced Manager and NOT YouTube Vanced/YouTube Vanced Music/Vanced microG.
The text was updated successfully, but these errors were encountered:
I was thinking of listening for the Activity's onPause method and launching a Foreground Service that displays a notification and keeps the app alive, but we found out that not many ROMs were friendly with this approach while testing.
@X1nto but why it stopped you from keeping that functionality? You can put a message in the window, that says something like "Some ROMs can kill app anyway".
And about implementing itself. Described approach is okay and it's used by many apps, such file explorers and others, but I suppose it's unnecessary to run the foreground service on onPause. You can do it immediately after starting update process and do all update-related work there(in background thread, indeed). For update progress to be available you can use Broadcast Receivers(context-registered ones, not ones that use manifest declaration) or any other approaches.
Actually, there's another approach you can try, but usually it shouldn't be used for such work. I mean WorkManager. All the work can be implemented there and for update progress you can use the same approach I mentioned above. The end of the work can be observed by integrated LiveData functionality.
@X1nto but why it stopped you from keeping that functionality? You can put a message in the window, that says something like "Some ROMs can kill app anyway".
And about implementing itself. Described approach is okay and it's used by many apps, such file explorers and others, but I suppose it's unnecessary to run the foreground service on onPause. You can do it immediately after starting update process and do all update-related work there(in background thread, indeed). For update progress to be available you can use Broadcast Receivers(context-registered ones, not ones that use manifest declaration) or any other approaches.
Actually, there's another approach you can try, but usually it shouldn't be used for such work. I mean WorkManager. All the work can be implemented there and for update progress you can use the same approach I mentioned above. The end of the work can be observed by integrated LiveData functionality.
WorkManager actually seems like a good alternative to services, I believe they even provide much more functionality. I'll try to implement this for the upcoming 3.0 that's in the compose branch
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Suggestion
Hello, developers! There's a problem with update processes after minimizing application. Don't you consider using Foreground Services for that kind of work? It would allow resume any update process after returning to app's window. For now it's just freezing at 100% and we have to restart update.
I'm pretty sure you know how implement it, but I can help if you don't.
Additional Information
Because sometimes download process takes a lot of time. It's weird to just wait and do nothing while downloading.
Additional checks
The text was updated successfully, but these errors were encountered: