[Camera Plugin] Canceling to take picture cannot be detected in PWA/iOS
Mobile icon
Forge component by Hector Gordin
Application Type
Service Studio Version
11.54.27 (Build 62849)
Platform Version
11.23.0 (Build 40636)

Clicking Cancel button in the view opened by TakePicture action closes the live camera view.
However following steps after TakePicture action are not performed.
So I cannot detect the canceling by user in my logic.
I confirmed the phenomena in PWA app on iOS 17.0.3.

Does anyone know the solution for this?

It looks that the TakePicture action of the current version (7.5.0) doesn't treat cancel callback in PWA.

Moriya Takasi

Hi Moriya,
If I understand your issue correctly, you have to catch the error message and then manually handle it. For me the error was "20" but for other devices it was different. so far we found and thus used this logic after the takepicture action:

(TakePicture.Error.ErrorMessage = "20") or
(TakePicture.Error.ErrorMessage = "No file selected") or
(TakePicture.Error.ErrorMessage = "No Image Selected") 

This solved our problems (error popping up).

I hope this will help you!



Hello David,

Thank you for taking your time.

What is the platform of your device?

On the case of my PWA (iOS 17.0.3 / iPhone 11 Pro), the action flow as below picture shows NO message popup when clicking cancel in the camera view.  When canceling, the process leaves from the flow through an invisible path.

I attach the sample oml which contains the above flow and can reproduce the trouble on my environments. 

It may be the problem for iOS only?

Again, I appreciate your kindness, David.

Moriya Takasi

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