Javascript API Reference (Version 3.4.0)
This is a list of component objects in the AppMobi Javascript Object provided by linking in appMobi.js.-
accelerometer
Use the accelerometer object to listen to the device's motion sensor -
analytics
Track how your application is used and accessed by setting custom events -
cache
This object is intended to provide local storage for data to speed up applications -
camera
Use the device's camera and access your device's camera library -
canvas
The canvas object provides the bridge functions to the directCanvas plugin -
device
Access information about and configure settings of the device itself using this object -
display
Take control of the device's video display properties -
file
Transfers files over the Internet -
geolocation
Make your application aware of where it is currently located -
notification
Alert the application's user about the application's state using a variety of methods -
oauth
Authorize or revoke authorization for a service such as Twitter or LinkedIn -
player
Play audio and video -
playingtrack
Access information about the media currently playing
Properties
AppMobi.jsVersion
AppMobi.jsVersion
Description
This property holds the current version of the appMobi Javascript library used in the application. It can be compared to the appMobi application version stored in AppMobi.device.appmobiversion.Example
alert(AppMobi.jsVersion);
Version
This property is available in appMobi Version 3.0.0AppMobi.updateMessage
AppMobi.updateMessage
Description
When a Live Update is triggered in an application, this property will return the text message associated with the update.Example
document.addEventListener("appMobi.device.ready",onDeviceReadyTestForUpdate,false);
function onDeviceReadyTestForUpdate(evt)
{
/* appMobi.updateAvailable indicates whether or not an over the air update is available or not. */
if (AppMobi.updateAvailable==true)
{
//there is an application update available at startup
if (confirm(AppMobi.updateMessage)==true) {
AppMobi.device.installUpdate();
}
}
}
Version
This property is available in appMobi Version 3.3.0AppMobi.updateAvailable
AppMobi.updateAvailable
Description
This property will indicate whether a Live Update is available for an application by returning a true or a false. It is only set following the appMobi.device.ready event. A true result indicates that an update is available and has not yet been installed.Example
document.addEventListener("appMobi.device.ready",onDeviceReadyTestForUpdate,false);
function onDeviceReadyTestForUpdate(evt)
{
/* appMobi.updateAvailable indicates whether or not an over the air update is available or not. */
if (AppMobi.updateAvailable==true)
{
//there is an application update available at startup
if (confirm(AppMobi.updateMessage)==true) {
AppMobi.device.installUpdate();
}
}
}
Version
This property is available in appMobi Version 3.3.0AppMobi.oauthAvailable
This property indicates whether the oAuth service is ready or not when the application starts up
AppMobi.oauthAvailable
Description
This property should be checked at appMobi.device.ready to see if the OAuth system is available.Version
This property is available in appMobi Version 3.4.0AppMobi.webRoot
This property holds the full path to appMobi's internal web server
AppMobi.webRoot



