PhoneGap is an open source framework that leverages Web technologies such as HTML and JavaScript to access native (system and third-party) functionality across platforms.
Sybase Unwired Platform comes with PhoneGap 1.4.1 libraries, which handle common tasks supported by most devices, linked in and ready to use. Integrating PhoneGap plug-ins with Hybrid Web Containers allows you to extend the set of APIs available within a Mobile Workflow application. See www.phonegap.com for information about the supported PhoneGap APIs.
You can use both Hybrid Web Container JavaScript APIs and PhoneGap APIs in a single Workflow application.
API | Object and Function | Platform |
---|---|---|
Accelerometer | ||
accelerometer
|
|
|
Acceleration
|
|
|
Camera | ||
Camera
|
|
|
CameraOptions
|
|
|
Capture | ||
Capture
|
|
|
MediaFile
|
|
|
Compass | ||
compass
|
|
|
Compass.Heading
|
|
|
Connection | ||
network.connection.type |
|
|
Contacts | ||
Contacts.create |
|
|
Contacts.find |
|
|
Contact.clone |
|
|
Contacts.remove Note: On Android, there is an issue with contacts not
being fully removed. See https://issues.apache.org/jira/browse/CB-75.
|
|
|
Contacts.save |
|
|
Device | ||
Device.name |
|
|
Device.phonegap |
|
|
Device.platform |
|
|
Device.uuid |
|
|
Device.version |
|
|
Events | ||
Deviceready |
|
|
Pause |
|
|
Resume |
|
|
Online |
|
|
Offline |
|
|
Batterycritical | iOS | |
Batterylow | iOS | |
Batterystatus Note: On Android, PhoneGap 1.4.1, this does not work due
to a known issue. See https://issues.apache.org/jira/browse/CB-173.
|
iOS | |
Menubutton |
|
|
Searchbutton |
|
|
File | ||
DirectoryEntry
|
|
|
FileEntry
|
|
|
FileReader
|
|
|
FileWriter
|
|
|
DirectoryReader
|
|
|
LocalFileSystem
|
|
|
FileTransfer
|
|
|
Geolocation | ||
geolocation
|
|
|
Position
|
|
|
Coordinates
|
|
|
Media | ||
Media.play |
|
|
Media.pause |
|
|
Media.stop |
|
|
Media.release |
|
|
Media.record |
|
|
Media.startRecord |
|
|
Media.stopRecord |
|
|
Media.getCurrentPosition |
|
|
Media.seekTo |
|
|
Media.getDuration Note: On
Android, this function returns a value without an error but always
returns -1, which indicates duration is not
available.
|
|
|
Notification | ||
Notification.beep |
|
|
Notification.confirm |
|
|
Notification.alert |
|
|
Notification.vibrate |
|
|
Storage | ||
window
|
|
|
Database
|
|
|
SQLTransaction
Note: On
Android, queries on the first database created do not work. You can
work around this by creating and opening two databases, the first of
which can have the size of 0, and the second to use as you normally
do. For
example:
var db = window.openDatabase("aName1", "1.0", "aName1", 0); db = window.openDatabase("aName2", "1.0", "aName2", 200000); |
|
|
SQLResultSet
|
|
|
SQLResultSetList
|
|
|
SQLError
|
|
|
localStorage
|
iOS |