building app in intel xdk: do you need to build for cordova to use cordova apis

浪子不回头ぞ 提交于 2020-01-24 05:22:07

问题


I have just learned of intel xdk and i am going over how it works and what are steps to produce apps.. However, i am stuck at some place in understanding it. Can you clarify some stuff for me.

From what i understand:

Intel XDK by default provides apis that extend cordova apis. And therefore cordova apis are included in the intel xdk and if someone wants to use them they just include a script tag with src set as 'cordova.js'. So my question if i am using cordova api instead of intel xdk apis..( i don't know why would someone do this..when both are the same thing so why go an extra trouble of adding cordova script tag then reference etc.) then can i build it as android app and cordova apis will work? or i have to choose cordova android app to make use of cordova apis?

My guess is just choosing to build for android will allow me to use cordova api because this is a big step and it'd have been in docs..maybe it's!?!?!


回答1:


Yes, you can build as "Android" app and cordova APIs will work as long as "cordova.js" script tag is included. It was mainly meant for building apps with intel.xdk APIs, Cordova 2.9 support was later added, Cordova plugins are not supported in this build.

"Cordova for Android" is in beta release, this is more like an actual Cordova app built using Cordova CLI, Cordova plugins will soon be supported, intel.xdk APIs are not supported. You have to include "cordova.js" script tag for Cordova APIs to work. This will become the default build for Android in future.



来源:https://stackoverflow.com/questions/22396143/building-app-in-intel-xdk-do-you-need-to-build-for-cordova-to-use-cordova-apis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!