android-appcachecleaner icon indicating copy to clipboard operation
android-appcachecleaner copied to clipboard

[feature request] Force stop

Open Pantyhose-X opened this issue 1 year ago • 4 comments

Support Force stop user app

Force stop

Screenshot_20240317-105652

Some apps may be associated with waking up other apps in the background, which is useful.

Pantyhose-X avatar Dec 18 '23 12:12 Pantyhose-X

I also need this

Lucky390163 avatar Dec 20 '23 10:12 Lucky390163

I need this feature

jujubeja avatar Jul 10 '24 13:07 jujubeja

You can “force stop” apps that Boot launches | or apps that launch due to network changes.

atlantis451 avatar Jul 28 '24 04:07 atlantis451

SuperFreezZ or Greenify do this standalone, but it'd be amazing to have 1 app that can do both or either. Each of those also supports https://github.com/bmx666/android-appcachecleaner/issues/243 to achieve speed.

TPS avatar Aug 03 '24 22:08 TPS

Force stop will be in the next release v2.1.0

bmx666 avatar Aug 23 '24 18:08 bmx666

@bmx666 This just landed in v2.2.0 on F-droid, & glitches just a little bit: some apps won't stay stopped, but auto-reactivate d/t system or whatever, & that's ok. That's not a fail for your app, but something we users might need to adjust elseplace (e.g., disable target app's background, a11y, System, &/or Admin permissions).

I propose to change from the current force-stop ∞× behavior to force-stop 1× (to keep app from undefined behavior while cleaning), clean cache/data (depending on that setting), go back to force-stop 1× (because some apps like Chromium-based browsers, clean cache will reactivate app), & then move on to next app.

TPS avatar Sep 02 '24 13:09 TPS

Hey @TPS

Unfortunately, during my testing I found that some apps, especially from Google, don't stop at all, and it doesn't matter how many times you force stop them. Also don't forget about pending jobs, Android doesn't clean the cache in real time like you expect, it has a background job that triggers the cache cleanup and on some phones it can take 5-30 seconds.

bmx666 avatar Sep 02 '24 14:09 bmx666

Unfortunately, during my testing I found that some apps, especially from Google, don't stop at all, and it doesn't matter how many times you force stop them.

On such apps, we get ∞ loop of continuous force-stop, & cleaning never progresses. My proposal is to mitigate that.

TPS avatar Sep 02 '24 14:09 TPS

I didn't get it. Could you please grab logs with debug version of this behavior? Main algorithm: If force stop button was found it reset tries, and press button and then wait dialog with OK button, after it sets tries to 0, otherwise if force stop button disabled, decrease tries. By default it's 2 tries.

bmx666 avatar Sep 02 '24 15:09 bmx666

@bmx666 I just tried it. It looks like on, e.g., Nova Launcher, it tried 6-8× before going on to cleaning. How do I enable debug mode?

TPS avatar Sep 02 '24 15:09 TPS

@TPS you could find it in release section https://github.com/bmx666/android-appcachecleaner/releases/tag/v2.2.0 app-debug.apk (please reboot your phone after installation, cuz Accessibility service sometimes goes crazy) and during testing don't start Accessibility Service of release version.

bmx666 avatar Sep 02 '24 17:09 bmx666

appcachecleaner-log.txt.zip

@bmx666 Here you go. This is setting up the app the way I like & w/ only Nova Launcher being targeted. This time, there were "just" 4 attempts @ force-stop.

TPS avatar Sep 03 '24 02:09 TPS

Hey @TPS

There is no Title in Force Stop Dialog and it detects only Dialog with "Force stop text BLA BLA..." and buttons "Force stop" and "Cancel"

I made dialog checks otherwise it will be a mess because it's hard to determine "Force Stop" button in AppInfo or "Force Stop" button from Force stop dialog. There is no difference. But I will try to change behavior and find "Cancel" button with "Force Stop" button in, at least it will be close to dialog window. I hope no one has Settings AppInfo with "Force Stop" Button and "Cancel" button 😭

bmx666 avatar Sep 03 '24 10:09 bmx666

I made a new issue #271

bmx666 avatar Sep 03 '24 10:09 bmx666

Ao use app mgr pro app it includes function you want by using accessibility. Screenshot_20240903_191639_AppMgr Pro III

Lucky390163 avatar Sep 03 '24 13:09 Lucky390163

Ao use app mgr pro app it includes function you want by using accessibility.

I kindly ask that you refrain from comparing my app with commercial, profit-driven applications. I'm not a professional Android developer; I create apps as a hobby in my spare time. I don't have financial backing to develop and optimize my apps for a wide range of devices.

bmx666 avatar Sep 03 '24 14:09 bmx666

There is no play store link.I can't find it anymore

Lucky390163 avatar Sep 25 '24 18:09 Lucky390163

There is no play store link.I can't find it anymore

Hi @Lucky390163 , check #101

bmx666 avatar Sep 26 '24 01:09 bmx666

Please can you provide in the the description clearly.A play store logo.

Lucky390163 avatar Sep 26 '24 18:09 Lucky390163

Please can you provide in the the description clearly.A play store logo.

@Lucky390163 Did you read https://github.com/bmx666/android-appcachecleaner/issues/101 as you were asked?

TPS avatar Sep 26 '24 21:09 TPS