XomaDev / MIUI-Autostart

A library to check hidden MIUI autostart permission.
MIT License
127 stars 33 forks source link

Not working #6

Closed aea91 closed 1 year ago

aea91 commented 2 years ago

Hi we tested with Xiaomi device MIUI 12.5.6 In all conditions response is "autostart open"

XomaDev commented 2 years ago

What does the getAutoStartState() method return?

aea91 commented 2 years ago

return always => state = Autostart.State.ENABLED The code is written below return always true

` Autostart autostart = new Autostart(getApplicationContext()); Autostart.State state = autostart.getAutoStartState();

                            if (state == Autostart.State.DISABLED) {
                                // now we are sure that autostart is disabled
                                // ask user to enable it manually in the settings app
                                result.success(false);
                            } else if (state == Autostart.State.ENABLED) {
                                // now we are also sure that autostart is enabled
                                result.success(true);
                            }`
XomaDev commented 2 years ago

Can you tell me more about the device? What is the Android version, and is the "MIUI Optimization" disabled?

I'm not talking about normal optimization, the special one which MIUI has. If it gets disabled, the state result could be inaccurate.

XomaDev commented 1 year ago

Closing the issue, no response from the OP.

HelenLeonchenko commented 11 months ago

On my test device the same situation. Method getAutoStartState() returns ENABLED. Device: Redmi Note 9 MIUI version: 12.5.4 Android version: 11 MIUI Optimization: not depend on whether this parameter is enabled or disabled