r/android_devs • u/AD-LB • Dec 27 '22
Discussion Targeting Android 13, it's impossible to get current wallpaper info, unless you have broad permissions ( QUERY_ALL_PACKAGES , MANAGE_EXTERNAL_STORAGE)
When targeting Android 13, there are 2 major issues related to just reading what's on the current wallpaper, causing developers to be able to do it using 2 much bigger permissions:
- QUERY_ALL_PACKAGES- to get information about the current live wallpaper:https://issuetracker.google.com/issues/261901745
- MANAGE_EXTERNAL_STORAGE - to get information about the current image wallpaper (lock/home):https://issuetracker.google.com/issues/237124750
In fact, those functions of the framework didn't get an updated documentation to tell that those permissions are needed. I've noticed it too late, sadly.
I'm a developer of the small, spare-time app "LWP+" (here), and this affects me a lot, because one of the most common things users do is first import their current wallpaper.
Because of this, when I tried to add one of the permissions (MANAGE_EXTERNAL_STORAGE), the Play Policy team denied having it, and they claimed that it's not a core feature (but it is) and that I can use MediaStore API instead (which is also very wrong).
This is not the first time a large permission is needed for my apps due to new OS changes, (last one was (read here and here) but this time I find it hard to reach any understanding and any progress.
So, the way I see it, the future might be one of these:
- Google starts listening, and maybe have an exception to the rules for this case.I've already requested to have ways to solve it for future versions of Android, including a new permission to just read the wallpaper information, but that would be just for Android 14.
- Google won't start listening, which means any app that needs to use this API and can't have these permissions would need to have a companion app (either on the Play Store or outside) to do just that.
I tried to contact Google on the Play Console and on the Google Console help website (here). I tried to check on StackOverflow for possible solutions (here and here).
Instead of having minimized permissions for such a tiny feature as getting the wallpapers, it got broader. I don't need access to all apps. I don't need access to all files. I need access to a single app, and 1 or 2 image files...
Please consider checking and starring these bugs/requests on the issue tracker, so that Google might change their mind about how to handle these issues:
- https://issuetracker.google.com/issues/263721379 - request to add a new permission
- https://issuetracker.google.com/issues/261901739 and https://issuetracker.google.com/issues/261901736 , https://issuetracker.google.com/issues/277433302- update documentation about what's needed and what can be done (for the tiny chance I'm wrong and there is a workaround), and have a workaround being offered.
- https://issuetracker.google.com/issues/261893566 - a new API function to merge the queries into one.
- https://issuetracker.google.com/issues/261901745 and https://issuetracker.google.com/issues/237124750 - the changes themselves
- https://issuetracker.google.com/issues/272540594 - let READ_MEDIA_IMAGES also allow to get the current wallpaper.
- https://issuetracker.google.com/issues/273066280 - let SAF file-picker also offer the current wallpaper images to choose from
View all comments
Show parent comment
1
u/AD-LB Jan 28 '23
It is a problem. This permission is gone when you target Android 13, which is the issue I've described and what's the issue tracker is about...
Please try it out. I've also demonstrated it here:
https://issuetracker.google.com/issues/237124750#comment44
The only permission you can use on Android 13 when targeting it is the MANAGE_EXTERNAL_STORAGE, but then the policy team of the Play Store will not approve it for this purpose, even when I showed them there is no other way