39
Views
4
Comments
[Camera Plugin] How to make AllowMultiplePictures work for PWA?
camera-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

Hello!

I'm developing a mobile app to be used/installed as PWA and I need help using the AllowMultiplePictures parameter of the TakePicture client action. I'm testing this with an Android device.

We tried having the parameter set to TRUE and our expectation would be that the plugin would enable the user to take several pictures and then have some close/save button to return to the screen when all pictures were taken, only then would the client action proceed, so that we could save the pictures. Nonetheless, what seems to happen in the PWA is that after the picture is taken, the flow still proceeds and the camera closes itself.

Therefore, we had to implement recursiveness to re-open the camera after each picture is taken, trying to aim for the multiple picture experience we were aiming to have. Is this the right way to do it?


Also, when testing with the parameter set to FALSE, the interface seems OK and works well. But when it's set to TRUE, the interface is way simpler (only has a single button). 

AllowMultiplePictures = TRUEAllowMultiplePictures = FALSE


As a result, when a user needs to cancel the photo capture, they are using the Android back button and that is causing us navigation issues, especially when users do take several photos before cancelling. That is the main complain we are having.

I search for documentation on this parameter, but the only thing I found was here, where the suggested solution is to add the Theme as a dependency. The problem is the theme is empty and DEPRECATED, so no luck there


Let me know if you have any ideias on how to best approach this.

Thanks in advance!


Kind regards,

Tomás Silva Rocha

2021-02-17 18-31-05
Alexandre Jacinto
Staff

Hi Tomás,


When you say: "As a result, when a user needs to cancel the photo capture, they are using the Android back button and that is causing us navigation issues, especially when users do take several photos before cancelling. That is the main complain we are having."


Can you elaborate on the issue? What is happening exactly? What happens when the user takes multiple photos and then cancels?


Best regards,

Alexandre Jacinto

2022-08-25 15-33-28
Tomás Silva Rocha

Hi Alexandre,

Thank you for your reply.

We have a Record and RecordPhoto entity. In the RecordDetail screen, we have the list of RecordPhotos and the buttons for taking a Single photo (AllowMultiplePictures = FALSE) or Multiple photos (AllowMultiplePictures = TRUE).


The navigation issue we are experiencing is as follows:

  • User creates a record #1 and navigates to the RecordDetail screen, adds multiple RecordPhotos. No issues here, when exiting the camera the user is still in the RecordDetail screen.
  • User navigates back to the home screen and creates a Record #2, in order to add multiple photos again.
  • But this second time, after the user finishes taking photo and exits the camera, the app is navigating back to the Record #1 detail screen.
    • This is very odd, because if the multiple photos are just a few, it doesn't happen.
    • But when there were a considerable amount (let's say above 4 or 5), it happens.
    • Also, the user is always landing back on RecordDetail screen for the first record, never on a different screen where the user has been between both records (like Home page, or others).


I hope I made it clear enough :)


Kind regards,

Tomás Silva Rocha

2022-08-25 15-33-28
Tomás Silva Rocha

Hi again,

I put together a simplified version of the app, to facilitate the troubleshooting.

I have also recorded a short video where:

  • I created 1 record
  • Then created the second one with 5 photos but the issue still didn't occur
  • And on the 3rd one, after 10 photos, when I used the Back button I landed on the RecordPhotos screen of the first record.

This is the strange behavior I wasn't able to avoid so far. I'm not even sure if this is the correct way of implementing the multiple pictures logic for PWAs.


Kind regards,

Tomás Silva Rocha

MultiplePicturesInPWA.mp4
MultiplePicturesInPWA.oap
2021-02-17 18-31-05
Alexandre Jacinto
Staff

Hi Tomás,


Thank you for all the information you shared. In fact, the behaviour your report is odd but it may be related with the way your app is implemented.


I recommend that you open a support case with all the information you shared, so this can be properly analyzed.


Best regards,
Alexandre Jacinto

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.