Intel XDK JavaScript Bridge API

This document describes the intel.xdk APIs that are present in the "legacy" build containers. If you are building your HTML5 mobile app using the Cordova build containers, please see the Intel XDK Name Space API Plugin Details for Cordova Build Containers documentation page.

IMPORTANT: The Intel XDK legacy build options, which support the APIs described in this document, have been deprecated and will be retired. Some of the APIs described in this document have been converted into Cordova-compatible plugins and are available in open-source repos hosted on the site. Those open-source repos can be included as third-party plugins in your Cordova app and contain all the pertinent documentation regarding the APIs that have been ported to Cordova (see Adding Plugins to Your Intel® XDK Cordova* App for information on including third-party plugins as part of your app.) Note that not all of the APIs described in this document have been converted to Cordova-compatible plugins, see the individual repos for API details.

The purpose of the Intel XDK JavaScript Bridge API is to provide native features to an HTML5 hybrid application. This access is provided by including a unique JavaScript library in the application's index.html file, and then accessing objects through JavaScript. This API documentation will outline the capabilities of the JavaScript objects intended to give apps access to native features as well as provide brief samples and information about which features are available on specific platforms.

Using the JavaScript Bridge Library:

To use the Intel XDK JavaScript Bridge API, include the following line of code in your application's index.html file. This library will provide access to the API commands included in this document.

<script src="intelxdk.js" type="text/javascript"></script>

Once this JavaScript object has been fully loaded into memory, it will throw the intel.xdk.device.ready event. Look for that JavaScript event before trying to use the API object.

Notes on the JavaScript Bridge Library Update:

Previously, the JavaScript Bridge Library used the AppMobi and appMobi API namespaces for properties, methods and events. These objects have now all been replaced with the intel.xdk namespace. Any references to the AppMobi and appMobi namespaces in documentation, samples and code examples when referring to Intel XDK APIs should be replaced with an equivalent reference in the intel.xdk namespace.

For example:
Replace AppMobi.propertyName, AppMobi.objectName.methodName, and appMobi.eventName with intel.xdk.propertyName, intel.xdk.objectName.methodName and intel.xdk.eventName.

The deprecated AppMobi and appMobi namespace will continue to work for the near future, but support will eventually be dropped in favor of the new namespace. Please switch as soon as is practical to the intel.xdk namespace.

EXCEPTION: Properties, methods and events that are used by appMobi services are not changing and should still be referenced by using the appropriate AppMobi or appMobi namespace. These items are called out on the individual object pages, and can also be viewed on the appMobi documentation page.

API Reference:

The following list is a complete reference of the intel.xdkJavaScript Bridge API.


NOTE: The following properties/methods/events document appMobi services. They are temporarily supported by the intelxdk.js file, however, the namespace for these items should be kept as is and not be changed to "intel.xdk".

For more detailed documentation on these items, please refer to the appMobi documentation page.


Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.