Big5 API Documentation

device  1.1.0

Big5 API Documentation > device > Device.Image
Search:
 
Filters

static Class Device.Image

Access to photo library and camera of device.

Methods

_exec

private void _exec ( command , destinationURL , successCallback , errorCallback , cancelCallback )
Parameters:
command <String>
destinationURL <String>
successCallback <Object>
errorCallback <Object>
cancelCallback <Object>
Returns: void

getFromCamera

void getFromCamera ( destinationURL , successCallback , errorCallback , cancelCallback )
Get image form built in camera. See getFromPhotoLibrary for more details.
Parameters:
destinationURL <String>
successCallback <Object>
errorCallback <Object>
cancelCallback <Object>
Returns: void

getFromCameraToLocal

void getFromCameraToLocal ( destination , callback , onerror )
See getFromCamera.
Parameters:
destination <String>
callback <Object>
onerror <Object>
Returns: void
Deprecated : Worked only if called from a local page (file:///...)

getFromPhotoLibrary

void getFromPhotoLibrary ( destinationURL , successCallback , errorCallback , cancelCallback )
Choose an image from the photo library. The data is then send to the "destinationURL" URL via POST in a variable named "data". If it succeeds "successCallback" is called. On errors or cancelled operations the corresponding functions are called. For now there is no way to show progress of the upload operation. Before the image will be scaled down and rotated. Then it will be converted to a JPG format with a qualitiy of 100%.
Parameters:
destinationURL <String> The URL where the upload will be send to
successCallback <Object> Callback if image upload is done.
errorCallback <Object> Callback if an error occured.
cancelCallback <Object> Callback if user cancelled operation.
Returns: void

getFromPhotoLibraryToLocal

void getFromPhotoLibraryToLocal ( destination , callback , onerror )
See getFromPhotoLibrary.
Parameters:
destination <String>
callback <Object>
onerror <Object>
Returns: void
Deprecated : Worked only if called from a local page (file:///...)


Copyright © 2009 Dirk Holtwick. All rights reserved.