0
我对混合移动应用程序有一些疑问;混合移动应用程序的API调用
1. Is the final output of a hybrid app same as native app (.app for IOS, .apk for Android) ?
2. For a hybrid app, do we need 2-way communication between web portion and native portion of the app? I understand it would depend on the app, but am just asking a general question.
3. What kind of calls are needed between native/web portion of the app? e.g. I think one would be that web portion can tell the native portion that it has loaded. Can you list down some other examples ?
4. What is the role of a library like PhoneGap in a hybrid app ?
THX为...你说我们有专用的网络部分和本地部分之间的双向通信的应用程序....而且你还说PhoneGap API提供API来执行本地方法...因此对于混合应用程序,是否总是会让Web部分(JS调用本机方法)进行本地调用,并且我们有一个回调在网络端的帖子回应....但我们没有其他的方式(本地调用Web部分)? – testndtv
是的,本机代码可以随时在cordova webview上执行JS代码,在iOS上你可以使用[cordovaWebView stringByEvaluatingJavaScriptFromString:“javascript here”];并在java中与cordovaWebView.loadUrl(“javascript here”); – jcesarmobile