The <mobi:camera> component allows the developer to take a picture using a device's camera, and then upload the picture to the server to be processed or stored. For a non-container browser, the component will render a file upload button as a fallback, which will allow the user to select a picture on their local file system, which can then be uploaded in a similar manner. This component can be used with the <mobi:uploadhelper> component as seen in the example below with the <mobi:thumbnail>.
An ICEmobile Device Container must be present in order to use this component for taking an actual picture.
You will typically want to use the upload button to upload the image taken by the camera to the server. There is a valueChangeListener attribute which returns the value of the component map via the newValue attribute of the event.
The Map object is value bound to a backing bean and the File and contentType can be extracted from the Map in the backing bean.
Any validation that is required on this component can be done via the valueChangeListener as follows:
© Copyright 2016 ICEsoft Technologies Canada Corp.