The getPicture function provides access to the device's default camera application or device's photo library for retrieving a picture asynchronously.
If the SourceType is CAMERA or BOTH, 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 function 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, response) | 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.
In
the code, onGetPictureSuccess(fileName, response) will be used
as onGetPictureSuccess(fileName, imageURI) or
onGetPictureSuccess(fileName, imageData ). The parameter should
coincide with the PictureOption.DestinationType. There are two conditions:
|