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

feat: don't prompt background permission after being denied

Open escape0707 opened this issue 2 years ago • 1 comments

Type

Functionality

Branch

Flutter ig, downloaded from GitHub release.

Issue

I denied that background permission, but keep getting it every time I boot up the manager app.

Feature

Don't prompt background permission after being denied (several times).

Motivation

I'd like to propose to give people the choice if they prefer to let the manager finish it's job in the foreground while waiting.

Additional context

No response

escape0707 avatar Sep 15 '22 11:09 escape0707

Makes sense. We'll look into it. Thanks.

ponces avatar Sep 15 '22 14:09 ponces

I came to report this as a bug, thanks for saving me the time. Watching this.

Edit: Seems to work as expected now on v0.0.8. Excellent and much appreciated!

wrongway213 avatar Sep 17 '22 15:09 wrongway213

Yet it was working but had to be reverted as some users were having some issues with it. We may already have a fix on the way which should arrive soon on an alpha release.

ponces avatar Sep 18 '22 03:09 ponces

Can we simply use a foreground service to do the patching job with a progress notification?

https://developer.android.com/guide/components/foreground-services

This way we only need to request a normal permission which is accepted upon installation.

escape0707 avatar Sep 22 '22 06:09 escape0707

No, android will kill the process.

Aunali321 avatar Sep 22 '22 06:09 Aunali321

No, android will kill the process.

I read some documents and blog posts. May I ask whether you mean third party ROM might kill the process or the behavior is intended in even the original AOSP?

The blog post I want to refer to is https://honesdev.com/how-dare-you-kill-my-foreground-service/

And maybe this document too https://developer.android.com/training/monitoring-device-state/doze-standby#understand_app_standby

When I use LibreTorrent on my pixel, I don't need to give it background permission for it to download and upload in the background.

escape0707 avatar Sep 22 '22 07:09 escape0707

Ping after 10 days.

I don't know too much about android development, but I think apps like LibreTorrent do use forgetting services for their downloading. I even tried ehviewer and it downloads 2g CGs without interruption.

escape0707 avatar Oct 01 '22 14:10 escape0707

I use libretorrent. Libretorrent uses less than 10% cpu and 200mb ram. Manager uses minimum 70% cpu and 700mb ram. Android will most likely kill it.

Aunali321 avatar Oct 01 '22 15:10 Aunali321

I use libretorrent. Libretorrent uses less than 10% cpu and 200mb ram. Manager uses minimum 70% cpu and 700mb ram. Android will most likely kill it.

Oh, I see that's a fair reason that I didn't recognize.

Thank you for the explanation, and I think this issue is already fixed by the newer versions?

If so, feel free to close this issue.

escape0707 avatar Oct 01 '22 15:10 escape0707