The Camera.js file contains the getPicture function, which provides access to the device's default camera application for retrieving a picture asynchronously.
The getPicture function opens the device's default camera application (if the device has a camera) so the user can take a picture. Once the picture is taken, the device's camera application closes and the mobile workflow application is restored. If the device does not have a camera application, the functions reports that it is not supported.
Function | Description |
---|---|
getPicture(onGetPictureError, onGetPictureSuccess, options) |
|
onGetPictureError(errorcode) | This is a user defined function. Error codes include:
|
onGetPictureSuccess(fileName, imageData) | This is a user defined function. The return value is sent to the onGetPictureSuccess function, in one of the following formats, depending on the GetPicture options you specify. You can take this value and set it as a value into the MessageValueCollection function.
|