I have a page with a button called "Take Photo" in it.
Lets add an event for this button click. When you create an event an action chain is created.
Go to the action chain, and drag and drop the "Take Photo" action
You can change the source for the "Take Photo" action. It has options as "Camera","photoLibrary","savedPhotoAlbum". Let's go with "camera" option. Explore the other options and change as you need.
This action returns the file path of the captured photo. You are free to play around with that file path. You can use it to show the captured image, or use it to process the image. We are going to use the filepath and show the image For that let us create a page variable.
This action returns the file path of the captured photo. You are free to play around with that file path. You can use it to show the captured image, or use it to process the image. We are going to use the filepath and show the image For that let us create a page variable.
We need to assign the returned file path to this variable and further we will map this page variable to an image item in the page. In the action chain drag and drop "Assign Variables" next to "Take Photo" action.
Now Let's assign the variable
In the page add Image element and set the source of it to the page variable "capturedPhotoPath"
That's all. Now the captured image will be shown in the Image element.
Comments
Post a Comment