You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to select multiple images from the gallery.
RxPaparazzo
.multiple(this) // From a fragment
.usingGallery()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe { response ->
if (response.resultCode() != RESULT_OK) {
return@subscribe
}
// handle response.data()
}
It works fine for the files stored locally. Yet, when I choose Google Photos from the drawer menu, it allows me to select multiple pictures just fine but returns an array of just a single file.
I have done a little bit of debugging. I see that in PickFiles.java right in this place:
Uri pickedUri = intent.getData();
if (pickedUri != null) {
PermissionUtil.grantReadPermissionToUri(targetUi, pickedUri);
return Arrays.asList(pickedUri);
} else {
return getUris(intent);
}
it takes only a single Uri from .getData() and proceeds without checking ClipData (which is done in the getUris(intent) method). It looks like this ClipData actually contains Uris for all selected files including the first one, which is duplicated inside whatever getData() returns.
If it allows me to select multiple images through GUI, I would expect it to return all of them instead of just one.
Tested on Nokia 7 plus and an emulator, both running Android 9.
The text was updated successfully, but these errors were encountered:
I've just realized that images that I pick through "Photos" are also stored locally... My point is: it simply works when I choose images from the default picker that appears first, but when I go to "Photos" through the drawer menu (where "Photos", Google Drive and potentially other apps reside) I encounter the bug described above. Sorry for confusion.
I am trying to select multiple images from the gallery.
It works fine for the files stored locally. Yet, when I choose Google Photos from the drawer menu, it allows me to select multiple pictures just fine but returns an array of just a single file.
I have done a little bit of debugging. I see that in
PickFiles.java
right in this place:it takes only a single
Uri
from.getData()
and proceeds without checkingClipData
(which is done in thegetUris(intent)
method). It looks like thisClipData
actually containsUri
s for all selected files including the first one, which is duplicated inside whatevergetData()
returns.If it allows me to select multiple images through GUI, I would expect it to return all of them instead of just one.
Tested on Nokia 7 plus and an emulator, both running Android 9.
The text was updated successfully, but these errors were encountered: