In Kony Visualizer 7.3 is there a way to listen to the cancel event when using the camera widget?

Hi all,

My app is built on Kony Visualizer 7.3 and is running on iPhone.

I've just created a form with a camera widget and just found out that, while taking a picture/photo, if you click the cancel button there is no event to know that the user does not want a photo :

- https://docs.kony.com/konylibrary/visualizer/viz_widget_prog_guide/Content/Camera_Events.htm.

- https://docs.kony.com/konylibrary/visualizer/viz_widget_prog_guide/Content/Camera.htm.

Do you know how to handle this scenario ?

Thanks in advance,

Hervé Ndoguéfouva.

Hi Hervé Ndoguéfouva,

Cancel event is not exposed through visualizer in 7.3 but you could programmatically register a cancellation event.

Sample code below, please try it out.

(formid.camerawidgetid.onCaptureFailed = callback function)

frmCamera.myCamera.onCaptureFailed=onCaptureFailedCallBck;

function onCaptureFailedCallBck(camera){

//Write your code here.
}
Reference : https://docs.kony.com/konylibrary/visualizer/viz_widget_prog_guide/Default.htm#Camera_Events.htm


I would advise to upgrade the visualizer to latest one if possible. Current version supports assigning a method to cancel event right from the ide.

Hi Srinivas Sesham,

Thanks for your answer, I've implemented your suggestion but the result is the same : the call back function is never called.

We are planning to migrate to Kony Quantum 9.x and will fix it in that version.

In the mean time I'll add a menu in the footer of the form with a BACK button to let the user go back to where he came from.

Cordially,

Hervé Ndoguéfouba.