SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
http://phonegap.com


    Emil Varga
Software Engineer
     @ IBM
Develop in HTML5/CSS3 + JavaScript




                                     Deploy to multiple platforms
●   Free and Open Source
      ●   Large community
      ●   Plugins and tools
      ●   JavaScript frameworks


xui
Here be JavaScript and HTML
   WebView
   (browser)




Native application   Glued with PhoneGap
(Java, C++, C#..)



                     Extra stuff (Barcode scanner,
     plug-ins        Speech recognizer, Soft
                     keyboard etc.)
Technical details
    ahead
●   Eclipse Classic 3.4 – 3.7.x (current)
    http://www.eclipse.org/downloads/
●   Download Android SDK, extract zip/tar,
    run ./android, select all, install
    http://developer.android.com/sdk/index.html
●   Install Eclipse plugin
    (Help->Install New Software..)
    https://dl-ssl.google.com/android/eclipse/



    http://phonegap.com/start#android
●   Download PhoneGap 1.4.1 (currently)
●   Eclipse -> New -> Android Project
    ●   Select your build target (e.g. Android 2.2)
    ●   Add your package name
    ●   Un-check creating SampleActivity.java
●   Copy content of the phonegap sample project
    <extracted folder>/lib/android/example to the new Android
    Project (everything except project.properties)
    ●   Configure Build path -> Add JARs -> libs/phonegap-1.4.1.jar
    ●   Edit AndroidManifest.xml
        –   remove line android:xLargeScreens =”true”
        –   Change <uses-sdk android:minSdkVersion=”5” /> to your build target
            (e.g. 8)
//on application start wait for phonegap to fully load
document.addEventListener(“deviceReady”, function(){
    //pop up a confirmation dialog
    navigator.notification.confirm(“Do you want to exit?”,
           //function called on any button pressed (Yes or No)
           function(button){
              //user pressed 'Yes'
              if (button==1){
                 //exit application
                navigator.app.exitApp();
               }
           },”Confirm”, “Yes,No”);
},true);
Thanks to the PhoneGap team
And Brian LeRoux
Extra
●   Plugins
    https://github.com/purplecabbage/phonegap-plugins
●   Cool Tools
    ●   Lawnchair – simple NoSQL JSON
        http://westcoastlogic.com/lawnchair/
    ●   ApplicationCraft – zero install developer envoronment
        http://www.applicationcraft.com/
    ●   Ripple – in-browser device emulator
        http://ripple.tinyhippos.com/
    ●   PhoneGap build
        https://build.phonegap.com/
DIY plugins
//myPlugin.js

function MyPlugin() {};
MyPlugin.prototype.myAction =
function(params, winCallback, failCallback){
      PhoneGap.exec(winCallback, failCallback, “MyPlugin”,
      “myAction”, [params]);
}
PhoneGap.addConstructor(function(){
    PhoneGap.addPlugin(“myPlugin”, new MyPlugin());
});
DIY plugins
import com.phonegap.api.Plugin;
import com.phonegap.api.PluginResult;
import org.json.JSONArray;
import org.json.JSONObject;


public class MyPlugin extends Plugin{
    public PluginResult execute(String action, JSONArray args, String callbackId){
        if (action.equals(“myAction”)){
            JSONObject obj = args.getJSONObject(args);
            ...
            return new PluginResult(PluginResult.Status.OK);
        }
        else return new PluginResult(PluginResult.Status.INVALID_ACTION);
    }
}

Weitere ähnliche Inhalte

Was ist angesagt?

Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.UA Mobile
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...Olivier Destrebecq
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsSarath C
 
‘Hello, world!’ application how to dockerize golang application
‘Hello, world!’ application how to dockerize golang application‘Hello, world!’ application how to dockerize golang application
‘Hello, world!’ application how to dockerize golang applicationKaty Slemon
 
Porting golang development environment developed with golang
Porting golang development environment developed with golangPorting golang development environment developed with golang
Porting golang development environment developed with golangSeongJae Park
 
How to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happyHow to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happyIordanis (Jordan) Giannakakis
 
Eclipse RCP Demo
Eclipse RCP DemoEclipse RCP Demo
Eclipse RCP DemoCsaba Toth
 
Visual Studio App Center: React Native A/B Testing
Visual Studio App Center: React Native A/B TestingVisual Studio App Center: React Native A/B Testing
Visual Studio App Center: React Native A/B TestingJohn M. Wargo
 
Node.js Everywhere by @zwigby
Node.js Everywhere by @zwigbyNode.js Everywhere by @zwigby
Node.js Everywhere by @zwigbyCharlie Key
 
iOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityMichał Zygar
 
MDC2011 Android_ Webdriver Automation Test
MDC2011 Android_ Webdriver Automation TestMDC2011 Android_ Webdriver Automation Test
MDC2011 Android_ Webdriver Automation TestMasud Parvez
 
Insights on Protractor testing
Insights on Protractor testingInsights on Protractor testing
Insights on Protractor testingDejan Toteff
 
Django Deployer
Django DeployerDjango Deployer
Django DeployerColin Su
 
Introduction to phone gap
Introduction to phone gapIntroduction to phone gap
Introduction to phone gapDanet Krueng
 
OpenLayers 3 & Google Closure Compiler
OpenLayers 3 & Google Closure CompilerOpenLayers 3 & Google Closure Compiler
OpenLayers 3 & Google Closure CompilerCamptocamp
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 
Front matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShiftFront matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShiftLance Ball
 

Was ist angesagt? (20)

Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
‘Hello, world!’ application how to dockerize golang application
‘Hello, world!’ application how to dockerize golang application‘Hello, world!’ application how to dockerize golang application
‘Hello, world!’ application how to dockerize golang application
 
Porting golang development environment developed with golang
Porting golang development environment developed with golangPorting golang development environment developed with golang
Porting golang development environment developed with golang
 
How to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happyHow to build rock solid apps & keep 100m+ users happy
How to build rock solid apps & keep 100m+ users happy
 
Eclipse RCP Demo
Eclipse RCP DemoEclipse RCP Demo
Eclipse RCP Demo
 
Visual Studio App Center: React Native A/B Testing
Visual Studio App Center: React Native A/B TestingVisual Studio App Center: React Native A/B Testing
Visual Studio App Center: React Native A/B Testing
 
Node.js Everywhere by @zwigby
Node.js Everywhere by @zwigbyNode.js Everywhere by @zwigby
Node.js Everywhere by @zwigby
 
Cocoa pods
Cocoa podsCocoa pods
Cocoa pods
 
iOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3city
 
MDC2011 Android_ Webdriver Automation Test
MDC2011 Android_ Webdriver Automation TestMDC2011 Android_ Webdriver Automation Test
MDC2011 Android_ Webdriver Automation Test
 
Insights on Protractor testing
Insights on Protractor testingInsights on Protractor testing
Insights on Protractor testing
 
Django Deployer
Django DeployerDjango Deployer
Django Deployer
 
Introduction to phone gap
Introduction to phone gapIntroduction to phone gap
Introduction to phone gap
 
OpenLayers 3 & Google Closure Compiler
OpenLayers 3 & Google Closure CompilerOpenLayers 3 & Google Closure Compiler
OpenLayers 3 & Google Closure Compiler
 
Fastlane
FastlaneFastlane
Fastlane
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Front matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShiftFront matter: Next Level Front End Deployments on OpenShift
Front matter: Next Level Front End Deployments on OpenShift
 

Ähnlich wie PhoneGap

PhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsPhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsTechAhead
 
Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should knowISOCHK
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGapRamesh Nair
 
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Loïc Knuchel
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers dssprakash
 
EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopHolger Staudacher
 
Developing advanced universal apps using html & js
Developing advanced universal apps using html & jsDeveloping advanced universal apps using html & js
Developing advanced universal apps using html & jsSenthamil Selvan
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment pptsagaroceanic11
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment pptsagaroceanic11
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App DevelopmentAnnmarie Lanesey
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textToma Velev
 

Ähnlich wie PhoneGap (20)

PhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsPhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native Components
 
Phone gap development, testing, and debugging
Phone gap development, testing, and debuggingPhone gap development, testing, and debugging
Phone gap development, testing, and debugging
 
Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should know
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
Ionic2 - the raise of web developer, Riviera DEV le 17/06/2016
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Phone Gap
Phone GapPhone Gap
Phone Gap
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 
So you want to Develop on Android....
So you want to Develop on Android....So you want to Develop on Android....
So you want to Develop on Android....
 
EclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris WorkshopEclipseCon Europe 2012 Tabris Workshop
EclipseCon Europe 2012 Tabris Workshop
 
Developing advanced universal apps using html & js
Developing advanced universal apps using html & jsDeveloping advanced universal apps using html & js
Developing advanced universal apps using html & js
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - text
 

Kürzlich hochgeladen

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

PhoneGap

  • 1. http://phonegap.com Emil Varga Software Engineer @ IBM
  • 2. Develop in HTML5/CSS3 + JavaScript Deploy to multiple platforms
  • 3. Free and Open Source ● Large community ● Plugins and tools ● JavaScript frameworks xui
  • 4. Here be JavaScript and HTML WebView (browser) Native application Glued with PhoneGap (Java, C++, C#..) Extra stuff (Barcode scanner, plug-ins Speech recognizer, Soft keyboard etc.)
  • 5.
  • 7. Eclipse Classic 3.4 – 3.7.x (current) http://www.eclipse.org/downloads/ ● Download Android SDK, extract zip/tar, run ./android, select all, install http://developer.android.com/sdk/index.html ● Install Eclipse plugin (Help->Install New Software..) https://dl-ssl.google.com/android/eclipse/ http://phonegap.com/start#android
  • 8. Download PhoneGap 1.4.1 (currently) ● Eclipse -> New -> Android Project ● Select your build target (e.g. Android 2.2) ● Add your package name ● Un-check creating SampleActivity.java ● Copy content of the phonegap sample project <extracted folder>/lib/android/example to the new Android Project (everything except project.properties) ● Configure Build path -> Add JARs -> libs/phonegap-1.4.1.jar ● Edit AndroidManifest.xml – remove line android:xLargeScreens =”true” – Change <uses-sdk android:minSdkVersion=”5” /> to your build target (e.g. 8)
  • 9.
  • 10. //on application start wait for phonegap to fully load document.addEventListener(“deviceReady”, function(){ //pop up a confirmation dialog navigator.notification.confirm(“Do you want to exit?”, //function called on any button pressed (Yes or No) function(button){ //user pressed 'Yes' if (button==1){ //exit application navigator.app.exitApp(); } },”Confirm”, “Yes,No”); },true);
  • 11. Thanks to the PhoneGap team And Brian LeRoux
  • 12. Extra ● Plugins https://github.com/purplecabbage/phonegap-plugins ● Cool Tools ● Lawnchair – simple NoSQL JSON http://westcoastlogic.com/lawnchair/ ● ApplicationCraft – zero install developer envoronment http://www.applicationcraft.com/ ● Ripple – in-browser device emulator http://ripple.tinyhippos.com/ ● PhoneGap build https://build.phonegap.com/
  • 13. DIY plugins //myPlugin.js function MyPlugin() {}; MyPlugin.prototype.myAction = function(params, winCallback, failCallback){ PhoneGap.exec(winCallback, failCallback, “MyPlugin”, “myAction”, [params]); } PhoneGap.addConstructor(function(){ PhoneGap.addPlugin(“myPlugin”, new MyPlugin()); });
  • 14. DIY plugins import com.phonegap.api.Plugin; import com.phonegap.api.PluginResult; import org.json.JSONArray; import org.json.JSONObject; public class MyPlugin extends Plugin{ public PluginResult execute(String action, JSONArray args, String callbackId){ if (action.equals(“myAction”)){ JSONObject obj = args.getJSONObject(args); ... return new PluginResult(PluginResult.Status.OK); } else return new PluginResult(PluginResult.Status.INVALID_ACTION); } }