Intel XDK Legacy APIs

The TITLE of each API section in this document contains a hyperlink that will take you directly to a more detailed intel.xdk API (plugin) documentation page. The Intel® XDK plugins described on this page represent the intel.xdk APIs that are available as standard Cordova* plugins.

Note: the Intel XDK legacy build system HAS BEEN RETIRED! Those intel.xdk legacy APIs that have been recast as new Cordova plugins can be found in the 01.org GitHub repo. Not all intel.xdk legacy APIs were recast as new Cordova plugins. Those intel.xdk legacy APIs that are not present in the new Cordova plugins have been permanently retired. You are welcome to fork and modify the new Cordova plugins to suit your needs, if you find that you must continue to use the legacy APIs.

Many of the intel.xdk legacy APIs referenced in this document are redundant with the standard (or core) Cordova APIs. The core Cordova APIs are the preferred solution for your application. We recommend you only use an intel.xdk legacy API if there is no alternative in the form of a core Cordova or some other third-party Cordova plugin. If you have been using the intel.xdk legacy APIs we strongly encourage you to rewrite your application to use the standard Cordova plugins or an appropriate third-party Cordova plugin, because these intel.xdk legacy APIs are not receiving priority support or being enhanced.

Not all of the intel.xdk namespace APIs listed below are marked as DEPRECATED; eventually they will all be marked as DEPRECATED as alternative solutions are identified and posted here.

If you choose to use the intel.xdk legacy APIs we strongly advise that you do not mix overlapping Cordova and intel.xdk APIs within your application; in other words, use only the Cordova accelerometer API or the intel.xdk accelerometer API in your app, do not use both in the same application. This overlap in functionality between two similar device APIs exists for historical reasons and is not recommended for normal use.

To use Cordova plugin APIs in your application you must include a reference to "cordova.js" in your index.html file and add the appropriate Cordova plugins to your project. You add plugins using the Plugins Manager on the Projects tab; see Adding Plugins to Your Intel® XDK Cordova* App for details.

intel.xdk.base  DEPRECATED

This Intel XDK Cordova plugin and API has been deprecated. Use the equivalent standard Cordova deviceready event and Cordova device plugin instead. Note: the Cordova deviceready event is built into the Cordova framework and does not require any plugins be included as part of your application, just the appropriate "cordova.js" reference in your index.html file.

Use the standard Cordova splashscreen plugin as an alternative to the intel.xdk splashscreen functions.

For alternatives to the platform detection properies use the cordova.platformId, device.platform, device.model and device.cordova properties and the standard HTML5 navigator.userAgent property. To detect when your application is running inside the Emulate tab test for the presence of the window.tinyHippos object.

An alternative to the intel.xdk web root function is:

// getWebPath() returns the location of index.html
// getWebRoot() returns URI pointing to index.html

function getWebPath() {
    "use strict" ;
    var path = window.location.pathname ;
    path = path.substring( 0, path.lastIndexOf('/') ) ;
    return 'file://' + path ;
}

function getWebRoot() {
    "use strict" ;
    var path = window.location.href ;
    path = path.substring( 0, path.lastIndexOf('/') ) ;
    return path ;
}

The recast Cordova plugin for the intel.xdk.device API is located in this 01.org GitHub repo.

intel.xdk.accelerometer  DEPRECATED

This Intel XDK Cordova plugin and API has been deprecated. Use the equivalent standard Cordova device motion plugin instead.

The recast Cordova plugin for the intel.xdk.accelerometer API is located in this 01.org GitHub repo.

intel.xdk.audio

There are a variety of good third-party alternatives for recording and playing back audio. For recording audio or video we recommend using the core Cordova media capture plugin. For playing back audio you can use the core Cordova media plugin or use your favorite Internet search engine to search for low latency audio cordova to find some third-party alternatives.

For best audio and video results on Android devices we highly recommend you use Crosswalk, not the native Android webview. The Android Crosswalk webview provides consistent features and behavior across all supported Android devices. Read When is an HTML5 Web App a WebView App? for more details.

The recast Cordova plugin for the intel.xdk.audio API is located in this 01.org GitHub repo.

intel.xdk.cache

There are no direct equivalent third-party plugins to the intel.xdk.cache plugin; however, you may find the "litehelpers" sqlite storage plugin to be a good alternative for your needs, or the core Cordova file plugin plus the Cordova file transfer plugin. Also see the Cordova storage documentation for other alternatives and more information.

The recast Cordova plugin for the intel.xdk.cache API is located in this 01.org GitHub repo.

intel.xdk.camera

For capturing images with the camera and accessing those images.

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.camera API is located in this 01.org GitHub repo.

intel.xdk.contacts

For access to the on-device contacts database.

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.contacts API is located in this 01.org GitHub repo.

intel.xdk.device

Configure the device and/or retrieve information pertinent to the device.

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.device API is located in this 01.org GitHub repo.

intel.xdk.display  DEPRECATED

This Intel XDK Cordova plugin and API has been deprecated. Please use the meta viewport tag.

The following articles are worth reviewing:

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.display API is located in this 01.org GitHub repo.

intel.xdk.facebook  DEPRECATED

This Intel XDK Cordova plugin and API has been deprecated. A suggested alternative Cordova plugin for use on Android and iOS platforms is available as a third-party plugin. Coverage for all platforms is available using this JavaScript micro library (this is not a plugin). In addition, a general-purpose OAuth2 JavaScript library (no plugin required) named "HelloJS" can be used to log into Facebook (as well as a variety of other services).

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.facebook API is located in this 01.org GitHub repo.

intel.xdk.file

For uploading files to an appropriately configured server.

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.file API is located in this 01.org GitHub repo.

intel.xdk.geolocation  DEPRECATED

This Intel XDK Cordova plugin and API has been deprecated. Please use the equivalent standard Cordova geolocation plugin instead.

The recast Cordova plugin for the intel.xdk.geolocation API is located in this 01.org GitHub repo.

intel.xdk.multitouch

To enable device multi-touch features on Android devices.

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.multitouch API is located in this 01.org GitHub repo.

intel.xdk.notification  DEPRECATED

This Intel XDK Cordova plugin and API has been deprecated. Please use the equivalent Cordova dialog and Cordova vibration plugins instead.

The recast Cordova plugin for the intel.xdk.notification API is located in this 01.org GitHub repo.

intel.xdk.player

For playing audio and video media files and streams.

Under Construction... Additional details and alternatives to be provided soon...

The recast Cordova plugin for the intel.xdk.player API is located in this 01.org GitHub repo.

Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.