Robert Menke
11/11/2020, 12:18 AMIan Lake
11/11/2020, 12:43 AMGET_CONTENT
to have the user select an image using the standard image picker.GetContent
contract: https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContracts.GetContent) as per the start activity for a result docs: https://developer.android.com/training/basics/intents/resultRobert Menke
11/11/2020, 12:47 AMgildor
11/17/2020, 2:28 AMNote that with the storage restrictions in recent versions of Android, you should really avoid having an image picker in your own UI@Ian Lake but isn’t it still possible to have custom file picker on Android 11, it requires READ_EXTERNAL_STORAGE, which provides read only access to files I’m not a fan of custom file picker, but if you check, most of big apps who rely a lot on file picking (like messengers) have custom file picker, and it very sad situation, because overall idea of document open intent is very good, but it for some reason doesn’t work, we also pushed by product to do the same, and I understand this argument, default behaviours of document picker are very strange (like remembering position in completely unrelated pick request with different file type)
Ian Lake
11/17/2020, 3:51 AMgildor
11/17/2020, 4:03 AMIt continues to be a terrible idea that only applies to local filesCompletely agree about it, but it doesn’t prevent you from still allowing select document picker (though no one allows to do that as I see)
If the user always selects photos from Drive, I don’t know why you’d call remembering that a bug - that’s working as intendedSimple use case, we have image picker and audio picker, there is no reason to remember dir with audio files on Google Drive when pick image Also, looks that there are some device specific bugs for file picker
Ian Lake
11/17/2020, 4:15 AMgildor
11/17/2020, 4:16 AM