Adobe董龙飞:PhoneGap 15Min.ppt
《Adobe董龙飞:PhoneGap 15Min.ppt》由会员分享,可在线阅读,更多相关《Adobe董龙飞:PhoneGap 15Min.ppt(27页珍藏版)》请在三一办公上搜索。
1、PhoneGap,Mark DongDeveloper E,始于2008年 旧金山的iPhoneDevCamp“bridging the gap between the web and the iphone SDK”PhoneGap:its like AIR for the Iphone(2008-9-18,Nitobi blog),1.3 Released!,CallBack,更名为 Apache Cordova,Native Web Control,全功能浏览器没有边框,JS,Native,PhoneGap plugin,HTML5项目,phonegap.jar,plugins.xml,A
2、ndroidManifest.xml,android activity,In Java,public class CirclesActivity extends DroidGap Override public void onCreate(Bundle savedInstanceState)super.onCreate(savedInstanceState);super.loadUrl(file:/android_asset/www/index.html);,Native Wrapper with PhoneGap,public class callsPGPlugin extends Plug
3、in/List Actionspublic static final String ACTION=list;Overridepublic PluginResult execute(String action,JSONArray data,String callbackId)PluginResult result=null;if(ACTION.equals(action)CallLogAI callLogAI=new CallLogAI(ctx);JSONObject callsHistory=callLogAI.fetchCallLogs(null);Log.d(RESULT=,callsHi
4、story.toString();result=new PluginResult(Status.OK,callsHistory);elseresult=new PluginResult(Status.INVALID_ACTION);Log.d(CallsPlugin,Invalidate action:+action);return result;,Java定制plugin,注册plugin,In JavaScript,Javascript接口,var CallsListing=function();CallsListing.prototype.list=function(successCal
5、lback,failureCallback)return PhoneGap.exec(successCallback,failureCallback,CallsHistoryPlugin,list,test);PhoneGap.addConstructor(function()PhoneGap.addPlugin(callsListing,new CallsListing););,window.plugins.callsListing.list(function(r)printResult(r),function(e)console.log(e);,Javascript 调用plugin,小结
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Adobe董龙飞:PhoneGap 15Min Adobe 董龙飞 PhoneGap 15 Min
链接地址:https://www.31ppt.com/p-2870243.html