I have implemented the new Camera component and I'm using the ChooseFromGallery action which is new from the previous version that I had. I have AllowMultipleSelection set to True, and Include Metadata set to default (false). MediaType is set to Picture only.
When I call the action, I get error code OS-PLUG-CAMR-0021 (description): Couldn't choose media from the gallery.
Has anybody had success in implementing this new feature? I'm on the latest iOS 16.4.1 (a). I have not yet tried Android.
Version 7.3.0 fixes these issues and it will be moved to stable without any changes until the end of next week.
This is fantastic news!
Hey Mike,
Can you share more information on the issue? I'm particularly interested in the following:
- What behaviour are you facing? Is the error showing on opening the Photo Gallery or after selecting one/multiple pictures?
- Does it happen if AllowMultipleSelection is set to False?
- Is the behaviour different if you select a single picture or multiple ones?
- What's the origin of the selected picture(s)? The device's camera or a remote one (iCloud)?
Thanks.
Thank you for your response Ricardo, I should have included more information. My responses are in red
- What behaviour are you facing? Is the error showing on opening the Photo Gallery or after selecting one/multiple pictures? The error is showing up when tapping the "Done" button. The image selection screen goes away and the Error pops up. So, I am able to successfully select the image(s), it's just when tapping "Done" that I get the error.
- Does it happen if AllowMultipleSelection is set to False? Yes, it happens when I call ChooseFromGallery action. I can play around with the other parameters as well, but it seems to be thrown no matter what is set
- Is the behaviour different if you select a single picture or multiple ones? No, it doesn't matter if I select one or multiple, the error is returned no matter what. However, when I call "ChooseGalleryPicture", that works fine.
- What's the origin of the selected picture(s)? The device's camera or a remote one (iCloud)? I'm not sure how to distinguish, because it's all considered the "Photo Library" on my phone. I do know that the photos are downloaded locally on my phone though in the library.
I will play around with more settings today and maybe create a test app, as well as test on Android to see if I can replicate the issue.
Thank you for your reply.
Please let me know how that goes, community feedback is always important.
Regarding your answer to my last question, we can do the following to validate it:
1. Take a picture using the plugin's "Take Picture" client action, with the input "SaveToPhotoAlbum" parameter set to True. This will save the captured picture on your device's photo gallery. That way we'll definitely know that its a picture captured using that same device, not a remote one obtained through iCloud.
2. Use the "ChooseFromGallery" client action to select that same picture from the Photo Gallery and check if the OS-PLUG-CAMR-0021 is returned.
Thanks for reaching out.
Regarding your question, I did just that and the plugin was successful. However, all these photos I took from this same device. But I took them more than 24 hours ago. Photos I took within the last 24 hours seem to be working. Is there a way around this limitation? This is a difficult issue to manage.
The new app that I created has the same problem.
Thank you for your reply. It definitely is a odd behaviour and we'll have a look on our side to try to replicate and fix it.
As a workaround, have you tried the "ChooseGalleryPicture" client action, also available on the plugin?
Yes, I have used that, but of course it doesn't have the correct behavior to select multiple photos. I was using a different plugin that had the correct behavior, but it doesn't compile on Android with the latest version of MABS, so I decided to try something else. I thought an OS-supported component would be a good option.
Hi Mike, it is a good option. We will be releasing a new version of the Camera plugin with this fixed.