d4rken-org / sdmaid-se

SD Maid 2/SE is Android's most thorough cleaning tool.
https://play.google.com/store/apps/details?id=eu.darken.sdmse
GNU General Public License v3.0
2.62k stars 403 forks source link

After finishing ACS Schedule don't go always to homescreen #1240

Closed MarkyMarkDE closed 2 months ago

MarkyMarkDE commented 3 months ago

In addition to #1229:

It's not the best way, to go always to Homescreen after finishing the ACS Schedule, on AndroidTV this action closes the current running TV App (in my case waipu TV) and goes to the "waipu TV Home" App. On Android 15 it close also the last running and "active" App.

Is it not possible only try to force close SDMaid if it was not opend before the Scheduler run?

Version 1.1.1-beta0 AndroidTV 11, Android 15

d4rken commented 3 months ago

There is no direct way to just close SD Maid without root or shizuku.

The previous way of pressing back button stopped working in Android 14 or 15 in my tests, which is why I changed the method of closing the last app.

:thinking: not sure at the moment on how to further improve this.

MarkyMarkDE commented 3 months ago

Sorry but the current solution isn't good at all.

Please bring back the old method with pressing the back button. I'm pretty sure, that this method on AndroidTV 11 will work and maybe on Pixel 7 with Android 14 too. If this changes becomes effect in Android 15, so we need to find another way to handle or maybe a little different way will be possible then.

So i think, why should g* remove a navigation method or function element without any kind of replacement? Let me help you to investigate, need so much information as I can have to be able to do.

With the current solution the user can lost data while sdmaid-se kills all and always go to home. Example: the user writes something like email or chat (he didn't save it) and sdmaid-se runs with schedule and ACS and after finishing, it closes all previous opend apps, the text from user before is lost.

Can only talk about myself the old solution with the back button has always worked for me on all devices in the past. Think about AndroidTV, here we are on 11 so the old method will work.

MarkyMarkDE commented 2 months ago

I have tested now from the current version down to 0.23.0 and all is great again. On all my devices the "push back" method do work perfect.

AndroidTV 11 Patches from April 5th 2024 Android 14 Patches from July 5th 2024

Conclusion: 0.23.0 works as expected and SDMaid SE really "fly through the system" 0.24.0 up to 1.0.0 has open SDMaid SE UI which wasn't opened by me (should background process only) Start with 1.0.1 goes after finishing scheduled ACS always to home screen and closes all previous opened apps

Please check 0.23.0 too and if you are able to confirm, bring back this method from 0.23.0, maybe you had if you tested it in past an bug in your testing system or something, so I really, really hope 😉

To summarize, something happened between 0.23.0 and 0.24.0 that changed either the push back method or SDMaid SE itself, I don't know what exactly with all the changes and improvements. But I'm pretty sure, that you will find the main problem and after we can use the push back method in future releases again :wink:.

MarkyMarkDE commented 2 months ago

Fixed on AndroidTV only? In Android 24 the old method do also work well

d4rken commented 2 months ago

As far as I understood it: The core issue was that SD Maid pressing the home button would close a previous app that was open. In my mind, this could be common on a TV (which may be always on), but doesn't seem common to me for a phone. Which phone is always on with an app that isn't the launcher?

In my tests it only needed 1 back press on Android TV, so it's reliable here and restoring the previous behavior has no downside, but for phones this is not the case.

I changed the behavior because the back button presses have two issues:

Can you elaborate your Android phone use-case further?

Why do you have an unlocked Android 14 phone with another application open when the scheduler trigers?

MarkyMarkDE commented 2 months ago

I have a Pixel 7 (not rooted in any way) with the default Pixel launcher and version 0.23.0 works here perfect (Android 14 with July 24 patches).

If Android 15 really change anything for that case, we should find a better way as close really all opened apps and go to the home screen. I will help so good I can. When you need more details please come back to me. For my case, you can also restore the push back method, it really works!

MarkyMarkDE commented 2 months ago

Sorry deutsch:

Auf AndroidTV immer push back Methode, darüber sind wir uns ja einig 😍👍. Dass Google hier sowas wichtiges ersatzlos entfernt, kann ich mir nicht vorstellen, da es ja keine Wischgesten oä. gibt.

Auf anderen ROMs versuchen wir zuerst die Push back Methode und wenn die fehlschlägt, nutzen wir die go home Methode. Wäre das akzeptabel und möglich?

Die Regeln kann man ja sicher auch abwandeln oder erweitern, falls nötig.

d4rken commented 2 months ago

Wäre das akzeptabel und möglich?

:thinking: possible...

Auf anderen ROMs versuchen wir zuerst die Push back Methode und wenn die fehlschlägt, nutzen wir die go home Methode.

This would solve the issue of "back button" not working, but leave issue of needing different (1-3?) back button presses depending on the ROM. This could be fixed though if I make this a configurable action depending on the ROM type :thinking:

I will need to test this to see if the failed back button presses can be detected.

Can you make a new ticket? This would be an enhancement to the AppCleaner's ACS feature. To improve the reliabilitly.

MarkyMarkDE commented 2 months ago

Please do open the ticket by self, my English is bad and maybe misunderstanding, so it is better when you wording it, at least you must understand it 😉

MarkyMarkDE commented 2 months ago

Which rules we need, don't know. I thought we find a relative "Simple" way. No, always go home isn't the method what I thinking of 😉

MarkyMarkDE commented 2 months ago

Übrigens wird warum auch immer und von wem auch immer, das Rollout von AndroidTV 12 immer wieder verschoben. Hoffentlich behalte ich mit der Vermutung Recht, dass Google sowas wichtiges nicht ersatzlos streicht. Bei waipu.tv gibt es ja noch die Besonderheit, dass es hier eine klassische Fernbedienung gibt, die natürlich weiterhin funktionieren muss.