Card
The Card object contains methods that invoke cards.
This API is considered to be in Beta.
The function and property signatures listed below could change at anytime.
Once the API moves out of Beta it will be distributed as part of the core API.
Last Updated: Sun Dec 30 2012 18:15:34 GMT-0500 (EST)
Supported Platform(s)
- BlackBerry 10 |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
You must declare the feature element(s) below in your configuration document: |
Feature ID | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
<feature id="blackberry.invoke.card" /> | Y |
Permission Elements (PlayBook and BlackBerry 10+) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Functions
Constants
String | CAMERA_MODE_PHOTO |
String | CAMERA_MODE_VIDEO |
String | CAMERA_MODE_FULL |
String | FILEPICKER_MODE_PICKER |
String | FILEPICKER_MODE_SAVER |
String | FILEPICKER_MODE_PICKER_MULTIPLE |
String | FILEPICKER_MODE_SAVER_MULTIPLE |
String | FILEPICKER_VIEWER_MODE_LIST |
String | FILEPICKER_VIEWER_MODE_GRID |
String | FILEPICKER_VIEWER_MODE_DEFAULT |
String | FILEPICKER_SORT_BY_NAME |
String | FILEPICKER_SORT_BY_DATE |
String | FILEPICKER_SORT_BY_SUFFIX |
String | FILEPICKER_SORT_BY_SIZE |
String | FILEPICKER_SORT_ORDER_ASCENDING |
String | FILEPICKER_SORT_ORDER_DESCENDING |
String | FILEPICKER_TYPE_PICTURE |
String | FILEPICKER_TYPE_DOCUMENT |
String | FILEPICKER_TYPE_MUSIC |
String | FILEPICKER_TYPE_VIDEO |
String | FILEPICKER_TYPE_OTHER |
Functions
static
void
blackberry.invoke.card.invokeCamera
(mode : String, onSave: function([path: String]), onCancel: function([reason: String]), onInvoke: function([error: String]))
Invokes the Camera Card.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
mode | A string to specify the photo video or full mode. |
onSave |
The callback function that will be triggered if the user saves a picture or video.
path: A String that describes the path of the file saved. |
onCancel |
The callback function that will be triggered if the user does not save and simply quits the camera.
reason: A String that describes the reason the camera was cancelled. |
onInvoke |
The callback function that will be triggered when the camera is invoked.
error: A String that describes if there was an error. No error will be returned on success. |
Code Example:
|
static
void
blackberry.invoke.card.invokeFilePicker
(options : blackberry.invoke.card.FilePickerOptions, onDone: function([pathArray: String]), onCancel: function([reason: String]), onInvoke: function([error: String]))
Invokes the FilePicker Card.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
options | An object to type blackberry.invoke.card.FilePickerOptions describe all the options available for FilePicker. |
onDone |
The callback function that will be triggered if the user selects file(s) or folder(s).
pathArray: An Array that describes the path of each of the files saved. |
onCancel |
The callback function that will be triggered if the user does not select file(s) or folder(s) and simply cancels.
reason: A String that describes the reason the FilePicker was cancelled. |
onInvoke |
The callback function that will be triggered when the camera is invoked.
error: A String that describes if there was an error. No error will be returned on success. |
Code Example:
|
static
void
blackberry.invoke.card.invokeIcsViewer
(options : blackberry.invoke.card.IcsViewerOptions, onDone: function([data: String]), onCancel: function([reason: String]), onInvoke: function([error: String]))
Invokes the IcsViewer Card.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
options | An object to type blackberry.invoke.card.IcsViewerOptions describes all the options available for IcsViewer. |
onDone |
The callback function that will be triggered .
data: A data string might be an empty or to contain some information. |
onCancel |
The callback function that will be triggered when the card invocation has been cancelled.
reason: A string that describes the reason the IcsViewer was cancelled. |
onInvoke |
The callback function that will be triggered when the IcsViewer card is invoked.
error: A String that describes if there was an error. No error will be returned on success. |
Code Example:
|
static
void
blackberry.invoke.card.invokeMediaPlayer
(options : blackberry.invoke.card.MediaPlayerOptions, onDone: function([data: String]), onCancel: function([reason: String]), onInvoke: function([error: String]))
Invokes the MediaPlayer Card.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
options | An object to type blackberry.invoke.card.MediaPlayerOptions describe all the options available for meida player. |
onDone |
The callback function that will be triggered when the user finished with the media player.
data: The data string back from the media player. |
onCancel |
The callback function that will be triggered if the user cancel the media player.
reason: A String that describes the reason the MediaPlayer was cancelled. |
onInvoke |
The callback function that will be triggered when the media player is invoked.
error: A String that describes if there was an error. No error will be returned on success. |
Code Example:
|
Constants
static
String
CAMERA_MODE_PHOTO
Describes the photo mode for camera.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
CAMERA_MODE_VIDEO
Describes the video mode for camera.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
CAMERA_MODE_FULL
Describes the full mode for camera which means photo,video and TimeShift.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_MODE_PICKER
Describes the picker mode for the FilePicker, allows picking a file.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_MODE_SAVER
Describes the saver mode for the FilePicker, allows saving a file.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_MODE_PICKER_MULTIPLE
Describes the multiple picker mode for the FilePicker, allows picking multiple files.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_MODE_SAVER_MULTIPLE
Describes the multiple saver mode for the FilePicker, allows saving mutltiple files.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_VIEWER_MODE_LIST
Describes the list view for the viewer of the FilePicker.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_VIEWER_MODE_GRID
Describes the grid view for the viewer of the FilePicker.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_VIEWER_MODE_DEFAULT
Describes the default view for the viewer of the FilePicker.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_SORT_BY_NAME
Describes the sort by field name.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_SORT_BY_DATE
Describes the sort by field date.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_SORT_BY_SUFFIX
Describes the sort by field suffix.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_SORT_BY_SIZE
Describes the sort by field date.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_SORT_ORDER_ASCENDING
Describes the sort order of ascending.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_SORT_ORDER_DESCENDING
Describes the sort order of descending.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_TYPE_PICTURE
Describes the picture type file.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_TYPE_DOCUMENT
Describes the picture type document.
Supported Platforms | |
---|---|
- BlackBerry 10 |
static
String
FILEPICKER_TYPE_MUSIC
Describes the picture type music.
Supported Platforms | |
---|---|
- BlackBerry 10 |