Does anyone have a (preferrably good) documentatio...
# compose
a
Does anyone have a (preferrably good) documentation of the Google Photos Content Providers at hand? Somehow the new image picker is able to read photos, even those not stored on the device. This also works with other providers like the Samsung cloud. I wondered how they do it and if its a public api. The background is that I am working on a compose based image picker library to replace the android photos picker as it is severely limited (no drag to select and things like this for example: https://issuetracker.google.com/issues/243294058 which google classified as “won’t fix”)
c
i know this isn't the answer your looking for. but i would strongly recommend just using the built in photo picker. its built into the system, has been backported to older android OS versions, and can receive updates through project mainline without needing a full OS update, and doesn't require your app to have full read permission of photos. that said, it still seems like itd be doable to just write a compose image picker if you get full access to users photos.
a
Regarding what you said last: Yeah its doable to write a compose only image picker - provided you don’t want to show any pictures that are stored in the cloud, like google photos cloud, which is basically 95% of all users pictures
Users will ask why they cant pick their pictures (people will not get the distinction between local pictures and pictures in the google cloud, inaccessible to my app) - negative ratings
I would love to just use the google picker, but I have multiple concerns, 1. Picking multiple images is not very well thought out, say a user needs to pick 50 images (my usecase requires similar numbers), he now has to click every single image once - drag to select? Not there. Same goes for semantic selection: trying to pick images taken at or around a certain location? Not possible. 2. Artificial limits on received data: You cannot get the location the image was taken at because it is blocked, event after acquiring required permissions. Why? No one knows. Google closed the bug report as won’t fix / intended behavior (linked above, including the complaints of several app devs, where this breaks their usecases). Sure these features might get added over time, then again they might not be added. Google has a pretty spotty record in adding new features. Might have to wait until 2026 to get location for images, who knows? It’s all out of our hands. In the past, Google’s androidx used to provide plug and play solutions for common usecases, but, if you wanted to implement it yourself, you could do it, provided you have the time and are willing to do it. Does not seem to be the case here. I have found no way on how to access photos in a way that supports cloud photos, nor is google planning to add it from what I can tell. It’s all around not great, I thought we were better than this on Android.
c
Just got this email from google btw
Last October, we introduced the Photo and Video Permissions policy to reduce the number of apps permitted to request broad photo/video permissions (READ_MEDIA_IMAGES and READ_MEDIA_VIDEO). Starting August 31, 2024, apps may only access photos and videos for purposes directly related to app functionality. Apps that have a one-time or infrequent need to access these files are requested to use a system picker, such as the Android photo picker. Learn more
a
🙈
c
Sounds like your app might have it directly related, but if not they might deny it
a
thanks, I guess Im stuck with the google picker, would be cool if I could do PRs
c
i think the photo picker is public
i came across that api when i was looking for how it did the bottom sheet like last year or two years ago
but you could find it, then submit a change on gerrit i suppose? https://cs.android.com/
okay. took me a few minutes. but yeah. in 2022 it was located here: https://cs.android.com/android/platform/superproject/+/master:packages/providers/Med[…]tivity.java;l=73;drc=c0c42ad152051d378ed29db0f52d193fc657f849 and i found that it was written with views instead of compose. and i stopped pursuing my project lol. but the link in the previous message should be the photopicker. you should be able to modify that and submit a change via gerrit.
a
I heard from a couple of companies that require high performance layouts that they are still using Views for the simple reason that they are better performing than compose (currently) - probably not the case here though. Views will not be a big issue, as long as contributing is possible. Thanks for the links, I will check them out. I hope Google allows PRs, that would be dope.
c
they do 😄
i think its as simple as this
😱 1
🚀 1