1 / 17

PhoneGap

PhoneGap. 박지훈 wlgns823@gmail.com. Install. Step 1: Installing the Prerequisite Software. Eclipse Java JDK Android SDK ADT Plug-in for Eclipse Apache ANT  Ruby (Ruby187) Git Bash. Step 2: Confirm Environment Variables. ANDROID_HOME D:/android-sdk-windows ANT_HOME

Download Presentation

PhoneGap

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PhoneGap 박지훈 wlgns823@gmail.com

  2. Install

  3. Step 1: Installing the Prerequisite Software • Eclipse • Java JDK • Android SDK • ADT Plug-in for Eclipse • Apache ANT  • Ruby (Ruby187) • Git Bash

  4. Step 2: Confirm Environment Variables • ANDROID_HOME • D:/android-sdk-windows • ANT_HOME • D:\apache-ant-1.8.1 • JAVA_HOME • C:\Program Files\Java\jdk1.6.0_20 • Path • C:\Ruby191\bin; • D:\apache-ant-1.8.1\bin; • C:\Program Files\Java\jdk1.6.0_20\bin; • D:\android-sdk-windows\tools • E:\JeeHoon\phonegap-android\bin

  5. Step 3. Download the PhoneGap Source Code • http://github.com/phonegap/phonegap-android

  6. Step 4. Build the Example PhoneGap App • ruby bin/droidgap create [path_of_application] • ruby bin/droidgap create example • ruby bin/droidgap gen …

  7. Step 5. Importing Your Example App into Eclipse

  8. Project

  9. JS -> Java

  10. JS -> Java

  11. JS -> Java

  12. Java -> JS

  13. Java -> JS

  14. WebView • android.webkit.WebView • http://developer.android.com/reference/android/webkit/WebView.html

  15. WebView • A WebView has several customization points where you can add your own behavior. • These are: • Creating and setting a WebChromeClient subclass. This class is called when something that might impact a browser UI happens, for instance, progress updates and JavaScript alerts are sent here (see Debugging Tasks). • Creating and setting a WebViewClient subclass. It will be called when things happen that impact the rendering of the content, eg, errors or form submissions. You can also intercept URL loading here (via shouldOverrideUrlLoading()). • Modifying the WebSettings, such as enabling JavaScript with setJavaScriptEnabled(). • Adding JavaScript-to-Java interfaces with the addJavascriptInterface(Object, String) method. This lets you bind Java objects into the WebView so they can be controlled from the web pages JavaScript.

  16. 요약 • phonegap.0.9.4.js • Library on js • js파일은 모든 플랫폼 동일할 것으로 생각됨 • Com.phonegap package • Library on anroid • android.webkit.WebView를 사용하여 JS와 Java사이의 interface를 제공하는 것으로 생각됨 • Customization by using WebChromeClient, WebViewClient • 주요 예상 작업 • Bada향 WebView와 같은 클래스 파악 • Phonegap.0.9.4.js 에서 native에 필요로하는 interface 파악

More Related