Would like to ask, is it possible for me to integrate both Intel XDK API and Phonegap API in a single mobile app? This is because, some of the API is only available in Phonegap and vice versa.
2 Answers
Yes, if I understand the question correctly, I believe you can access both API's in a single app using Intel XDK.

- 2,888
- 13
- 23
-
That is correct you can use both intel.xdk API and Cordova API in a app and build, include both intelxdk.js and cordova.js in your app. – krisrak May 02 '14 at 06:20
-
Do you mean that, I need to download the cordova.js then include it in my app? awesome.. thanks – WenHao May 02 '14 at 07:10
-
1no just add the script tags `` – krisrak May 02 '14 at 14:56
These hints can be found in index.html when you build a new blank project on XDK:
NOTE: do not use a directory prefix with intelxdk.js or cordova.js - they are inserted automatically by the build system, emulator and other tools and are assumed to be in the index.html source directory. You will not find these JS files anywhere in your project, they are "phantom" libraries. If you do see copies of these files as part of your project they should be removed to avoid confusing the XDK.
When building with any of the XDK Cordova build systems (e.g., "Cordova Hybrid App") you can omit the "intelxdk.js" and "xhr.js" script files shown below. It does not hurt to keep them, but they are not used in that environment, they are only needed for the "legacy" XDK build systems. (In the case of the Cordova build system, the Cordova and XDK apis are included as plugins and the CORS configuration is specified as a parameter in the build configuration file.)
so the answer is yes you can use both , also you may notice that some APIs like Accelerometer
, Geolocation
, or Base
API have been deprecated , and it is recommended by intel to use Cordova API instead to use these features.
Note:
You will not find source files for intelxdk.js
or cordova.js
, as you can see they are Phantom
files , automaticaly inserted in your script , so you shouldnt add any aditional source for both scripts , should you want to remove any of both sources , just delete the corresponding lines found in index.html:
<script src="intelxdk.js"></script> <!-- phantom library, needed for XDK api calls -->
<script src="cordova.js"></script> <!-- phantom library, needed for Cordova api calls -->

- 15,517
- 9
- 53
- 72