-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mistaking Battery Optimization for Autostart #81
Comments
I gave up on trying to make it work with what is provided, forked and overhauled it to suit my needs. Feel free to get inspired by anything or don't, either way the changes are too great to make a pull request. And btw, one more thing - comparing installed packages may be a little contra productive performance-wise, considering the app that uses this library might've declared a much larger amount of packages to query (or even all of them). But that shouldn't be a big issue. |
Hey, I took a look at your forked version, it seems like you have provided a method for getting the right intent, and removed the intent with the action for the one plus device. Did you do any other changes? Do you mind sharing: For example, in this library: https://github.com/thelittlefireman/AppKillerManager, there seem to be three different types of settings. Furthermore, it seems like this library (autostart) used the package and activity which correspond to "power saving" settings from the linked library for Samsung, and not the "autostart permission" settings, even though the linked library has support for "autostart permission" settings. It seems like this library (autostart) may cramp multiple types of settings under one name. At least, this seems to be the case for Samsung. Though, I am also wondering whether one can really make a classification of different types of settings across so many different phones.
In my case, I have problems with the work manager not running consistently if the app is closed on some phones and I am questioning whether to go down this route or not (asking the user for permissions). I am using the library together with some logic for checking the android battery optimization policy and it did have some positive results on my personal phones, but I am not sure if this will be the case with other phones. And, I even added an empty foreground service with the intention that the OS won't kill my app if there's a foreground service running (which basically kills the purpose of using a work manager). |
Hi, I'm still using the library and quite happy it's being updated, but there is one thing that I think was a completely wrong decision.
I updated from 1.0.8 to 1.1.0, hoping the new version would recognize that e.g. a OnePlus 6T does not have the Autostart settings and would return false on
autoStartPermissionHelper.isAutoStartPermissionAvailable(context)
. To mu surprise, it still returns true but instead takes me to the Battery Optimization screen. That is a different screen. My app already deals with that separately. Most apps must be. It is great to include that option, but it should never be under the same function call, because it simply is not the same thing. And looking at your code, it seems like it's been added to other device manufacturers as well.My suggestion? Keep it, but make it a separate functionality. This is just misleading.
Rant over, sorry if I'm sounding harsh, I really do appreciate all your work. :)
Edit: Oh and having the option to get the component name or intent action or whatever you want to call it that is resolved for the current device would also be extremely useful, for example to be able to compare it with other options that are implemented outside of the library. :)
The text was updated successfully, but these errors were encountered: