SlideShare uma empresa Scribd logo
1 de 26
Cordova: Using Your Web Skills
to Create Native Mobile Apps


                   Clay Ewing
Me?
• I teach here, at UM
  – Interactive MFA starting Fall 2013
• Web & Mobile Developer
• Game Designer
Cordova, aka PhoneGap
What is it?
• Framework for building mobile
  applications in HTML
• Allows access to native functions through
  JavaScript, like
  GPS, accelerometer, camera, etc.
  – http://docs.phonegap.com/en/2.3.0
Why Use It?
• Quick, no need to learn another
  language
• Cross platform compatible, minimal
  effort to make an app available on
  multiple mobile devices
• Open source
• Sell your app in a store
How does it work?
• Modern smart phone operating systems
  have their version of a webview
• Cordova is literally just a local web page
  seen through a full screen webview
• Plugins use device specific code
  (Objective C, Java, etc) to access
  functions through JavaScript
Plugins?
• A bunch of features are packed in
  automatically:
  – http://docs.phonegap.com/en/edge
• Community based plugins that focus on
  device OS specific stuff:
  – https://github.com/phonegap/phonegap-
    plugins
Let’s make an app!




http://www.github.com/claytical/magic8
Getting Started
• You need whatever IDE and SDK you
  would normally need.
  – iOS requires Xcode and the iOS SDK
    (https://developer.apple.com/)
  – Android requires Eclipse and the Android
    SDK (http://developer.android.com/sdk)
Look and Feel
• jQuery Mobile
  – http://jquerymobile.com
• Dojo
  – http://dojotoolkit.org
• Sencha Touch
  – http://www.sencha.com/products/touch
• iUI
  – http://www.iui-js.org/
Actually Getting Started
• Download the latest build
  – http://cordova.apache.org/#download
• Extract the zip file to wherever you want
  it
• Extract the zip file inside the zip file
  corresponding to the device you’re
  targeting
Unzipped iOS
Create the Project in Terminal
• For iOS, run:
  – bin/create <ProjectDirectory>
    <Namespace> <ProjectName>

  – bin/create
    “/Users/clay/Documents/CordovaExample”
    com.example.magic_8 Magic8
What the Command Creates




  Our focus:
A Little HTML
<h1>Magic 8 Ball</h1>
    <div id="asking">

          <textarea id="question" name="question" class="full" placeholder="To what
question do you seek the answer to?"></textarea>

         <button id="ask" class="gradient-button purple full">Ask</button>
      </div>

      <div id="answering" style="display:none">

        <div id="answer"></div>

        <button id="askagain" class="gradient-button purple full">Ask Again</button>
        <button id="newquestion" class="gradient-button purple full">New Q</button>
        <button id="share" class="gradient-button purple full">Share Results</button>
        <button id="tweet" class="gradient-button purple full">Tweet Results</button>

      </div>
Some CSS3 for Buttons
.gradient-button {
          display: inline-block;
          outline: none;
          cursor: pointer;
          text-align: center;
          text-decoration: none;
          font: 15px/100% Arial, Helvetica, sans-serif;
          padding: .5em 2em .55em;
          text-shadow: 0 1px 1px rgba(0,0,0,.3);
          -webkit-border-radius: .5em;
          border-radius: .5em;
          -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
          box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

.gradient-button:active {
          position: relative;
          top: 1px;
}
Make a Purple Button
.purple {
       color: #fef4e9;
       border: solid 1px #551A8B;
       background: #8A2BE2;
       background: -webkit-gradient(linear, left top, left
bottom, from(#8A2BE2), to(#551A8B));
}

.purple:active {
       color: #fef4e9;
       background: -webkit-gradient(linear, left top, left
bottom, from(#551A8B), to(#694489));
}
The JavaScript
• Clean up index.js
  – It has some extra stuff we don’t need
• Add zepto.js for easy manipulation
  – You can use whatever framework you like
• Add social.js for our Social Framework
  Plugin
  – This is iOS specific
Some More JavaScript
var answers = ['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes –
definitely', 'You may rely on it', 'As I see it, yes', 'Most likely’];

       function getAnswer() {
         $('#asking').hide();
         $('#answering').show();
         var selectedResponse = Math.floor((Math.random()*20));
         $('#answer').text(answers[selectedResponse]);
       }

       function newQuestion() {
         $('#question').val("");
         $('#asking').show();
         $('#answering').hide();

       }
Plugins? No problem.
• Place the m and h files into the plugins
  folder

• Copy the js file into the www/js folder


• Add extra frameworks to the project

• Add a line to
    config.xml
Use the Plugin with JavaScript
function fbResults() {
         var qa = $('#question').val() + " " + $('#answer').text() + "
#magic8";
         SocialFrameworkPlugin.postToFacebook( shareSuccess,
shareError, qa);

}

function shareSuccess() {
   console.log("Sharing Successful");
 }

function shareError() {
   console.log("Error sharing");
}
Icons and Splash Screens
And Build.
Adobe PhoneGap Build
• Streamline the process of building for
  other platforms
• No need to own a mac to build an iOS
  app
• Free for open source projects
• Private repositories require a
  subscription
  – $12/month for 3 private apps
Adobe PhoneGap Build
Questions?



              Clay Ewing
       www.claytical.com
 www.github.com/claytical
     c.ewing@miami.edu
               @claytical

Mais conteúdo relacionado

Mais procurados

jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptPhilipp Bosch
 
Deep dive into AngularJs for Beginners
Deep dive into AngularJs for BeginnersDeep dive into AngularJs for Beginners
Deep dive into AngularJs for BeginnersVassilis Pitsounis
 
Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFXRichard Bair
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileTerry Ryan
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery MobileTroy Miles
 
AppForum 2014 Boost Hybrid App Performance
AppForum 2014 Boost Hybrid App PerformanceAppForum 2014 Boost Hybrid App Performance
AppForum 2014 Boost Hybrid App Performancerobgalvinjr
 
An easy guide to Plugin Development
An easy guide to Plugin DevelopmentAn easy guide to Plugin Development
An easy guide to Plugin DevelopmentShinichi Nishikawa
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10Derek Jacoby
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4Derek Jacoby
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11Derek Jacoby
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicketnielsvk
 
Ember Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberEmber Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberAlex Blom
 
Build 2017 - B8002 - Introducing Adaptive Cards
Build 2017 - B8002 - Introducing Adaptive CardsBuild 2017 - B8002 - Introducing Adaptive Cards
Build 2017 - B8002 - Introducing Adaptive CardsWindows Developer
 
Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginDaniel Spilker
 

Mais procurados (20)

jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScriptjQTouch – Mobile Web Apps with HTML, CSS and JavaScript
jQTouch – Mobile Web Apps with HTML, CSS and JavaScript
 
Deep dive into AngularJs for Beginners
Deep dive into AngularJs for BeginnersDeep dive into AngularJs for Beginners
Deep dive into AngularJs for Beginners
 
Enterprising JavaFX
Enterprising JavaFXEnterprising JavaFX
Enterprising JavaFX
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 
Angular Classy
Angular ClassyAngular Classy
Angular Classy
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery Mobile
 
AppForum 2014 Boost Hybrid App Performance
AppForum 2014 Boost Hybrid App PerformanceAppForum 2014 Boost Hybrid App Performance
AppForum 2014 Boost Hybrid App Performance
 
An easy guide to Plugin Development
An easy guide to Plugin DevelopmentAn easy guide to Plugin Development
An easy guide to Plugin Development
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
Ember At Scale
Ember At ScaleEmber At Scale
Ember At Scale
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicket
 
Ember Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with EmberEmber Conf 2016: Building Mobile Apps with Ember
Ember Conf 2016: Building Mobile Apps with Ember
 
Untangling7
Untangling7Untangling7
Untangling7
 
Build 2017 - B8002 - Introducing Adaptive Cards
Build 2017 - B8002 - Introducing Adaptive CardsBuild 2017 - B8002 - Introducing Adaptive Cards
Build 2017 - B8002 - Introducing Adaptive Cards
 
Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL Plugin
 
Joomla REST API
Joomla REST APIJoomla REST API
Joomla REST API
 
Using Features
Using FeaturesUsing Features
Using Features
 

Semelhante a Cordova: Making Native Mobile Apps With Your Web Skills

Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMartinSotirov
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make itJonathan Snook
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseJen Looper
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)Bramus Van Damme
 
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
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsJAX London
 
Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhoneBrian Shim
 
How I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptHow I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptKevin Read
 
Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Kevin Read
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevMihail Mateev
 
Responsive WordPress workflow
Responsive WordPress workflowResponsive WordPress workflow
Responsive WordPress workflowJames Bundey
 
Lessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeLessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeRyan Boland
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsAndreas Sahle
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsSarah Sexton
 

Semelhante a Cordova: Making Native Mobile Apps With Your Web Skills (20)

Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 
React nativebeginner1
React nativebeginner1React nativebeginner1
React nativebeginner1
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and Firebase
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
phonegap with angular js for freshers
phonegap with angular js for freshers    phonegap with angular js for freshers
phonegap with angular js for freshers
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
Eye candy for your iPhone
Eye candy for your iPhoneEye candy for your iPhone
Eye candy for your iPhone
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Node azure
Node azureNode azure
Node azure
 
How I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptHow I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScript
 
Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
Responsive WordPress workflow
Responsive WordPress workflowResponsive WordPress workflow
Responsive WordPress workflow
 
Lessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeLessons from a year of building apps with React Native
Lessons from a year of building apps with React Native
 
Ionic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile appsIonic Framework - get up and running to build hybrid mobile apps
Ionic Framework - get up and running to build hybrid mobile apps
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 

Mais de Clay Ewing

Hypothesis Tested: Designing Games with Theoretical Frameworks
Hypothesis Tested: Designing Games with Theoretical FrameworksHypothesis Tested: Designing Games with Theoretical Frameworks
Hypothesis Tested: Designing Games with Theoretical FrameworksClay Ewing
 
Game Design Workshop for SEEDS at the University of Miami
Game Design Workshop for SEEDS at the University of MiamiGame Design Workshop for SEEDS at the University of Miami
Game Design Workshop for SEEDS at the University of MiamiClay Ewing
 
Getting Started with Queso
Getting Started with QuesoGetting Started with Queso
Getting Started with QuesoClay Ewing
 
Twine Workshop
Twine WorkshopTwine Workshop
Twine WorkshopClay Ewing
 
Win Win: Models for Creating a Social Impact Game on a Budget
Win Win: Models for Creating a Social Impact Game on a BudgetWin Win: Models for Creating a Social Impact Game on a Budget
Win Win: Models for Creating a Social Impact Game on a BudgetClay Ewing
 
Game Design dorkShop at LAB Miami
Game Design dorkShop at LAB MiamiGame Design dorkShop at LAB Miami
Game Design dorkShop at LAB MiamiClay Ewing
 
Defining games feedback
Defining games   feedbackDefining games   feedback
Defining games feedbackClay Ewing
 
CVJ531: Intro to MySQL
CVJ531: Intro to MySQLCVJ531: Intro to MySQL
CVJ531: Intro to MySQLClay Ewing
 
Welcome to CMP 394
Welcome to CMP 394Welcome to CMP 394
Welcome to CMP 394Clay Ewing
 

Mais de Clay Ewing (9)

Hypothesis Tested: Designing Games with Theoretical Frameworks
Hypothesis Tested: Designing Games with Theoretical FrameworksHypothesis Tested: Designing Games with Theoretical Frameworks
Hypothesis Tested: Designing Games with Theoretical Frameworks
 
Game Design Workshop for SEEDS at the University of Miami
Game Design Workshop for SEEDS at the University of MiamiGame Design Workshop for SEEDS at the University of Miami
Game Design Workshop for SEEDS at the University of Miami
 
Getting Started with Queso
Getting Started with QuesoGetting Started with Queso
Getting Started with Queso
 
Twine Workshop
Twine WorkshopTwine Workshop
Twine Workshop
 
Win Win: Models for Creating a Social Impact Game on a Budget
Win Win: Models for Creating a Social Impact Game on a BudgetWin Win: Models for Creating a Social Impact Game on a Budget
Win Win: Models for Creating a Social Impact Game on a Budget
 
Game Design dorkShop at LAB Miami
Game Design dorkShop at LAB MiamiGame Design dorkShop at LAB Miami
Game Design dorkShop at LAB Miami
 
Defining games feedback
Defining games   feedbackDefining games   feedback
Defining games feedback
 
CVJ531: Intro to MySQL
CVJ531: Intro to MySQLCVJ531: Intro to MySQL
CVJ531: Intro to MySQL
 
Welcome to CMP 394
Welcome to CMP 394Welcome to CMP 394
Welcome to CMP 394
 

Último

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Cordova: Making Native Mobile Apps With Your Web Skills

  • 1. Cordova: Using Your Web Skills to Create Native Mobile Apps Clay Ewing
  • 2. Me? • I teach here, at UM – Interactive MFA starting Fall 2013 • Web & Mobile Developer • Game Designer
  • 4. What is it? • Framework for building mobile applications in HTML • Allows access to native functions through JavaScript, like GPS, accelerometer, camera, etc. – http://docs.phonegap.com/en/2.3.0
  • 5. Why Use It? • Quick, no need to learn another language • Cross platform compatible, minimal effort to make an app available on multiple mobile devices • Open source • Sell your app in a store
  • 6. How does it work? • Modern smart phone operating systems have their version of a webview • Cordova is literally just a local web page seen through a full screen webview • Plugins use device specific code (Objective C, Java, etc) to access functions through JavaScript
  • 7. Plugins? • A bunch of features are packed in automatically: – http://docs.phonegap.com/en/edge • Community based plugins that focus on device OS specific stuff: – https://github.com/phonegap/phonegap- plugins
  • 8. Let’s make an app! http://www.github.com/claytical/magic8
  • 9. Getting Started • You need whatever IDE and SDK you would normally need. – iOS requires Xcode and the iOS SDK (https://developer.apple.com/) – Android requires Eclipse and the Android SDK (http://developer.android.com/sdk)
  • 10. Look and Feel • jQuery Mobile – http://jquerymobile.com • Dojo – http://dojotoolkit.org • Sencha Touch – http://www.sencha.com/products/touch • iUI – http://www.iui-js.org/
  • 11. Actually Getting Started • Download the latest build – http://cordova.apache.org/#download • Extract the zip file to wherever you want it • Extract the zip file inside the zip file corresponding to the device you’re targeting
  • 13. Create the Project in Terminal • For iOS, run: – bin/create <ProjectDirectory> <Namespace> <ProjectName> – bin/create “/Users/clay/Documents/CordovaExample” com.example.magic_8 Magic8
  • 14. What the Command Creates Our focus:
  • 15. A Little HTML <h1>Magic 8 Ball</h1> <div id="asking"> <textarea id="question" name="question" class="full" placeholder="To what question do you seek the answer to?"></textarea> <button id="ask" class="gradient-button purple full">Ask</button> </div> <div id="answering" style="display:none"> <div id="answer"></div> <button id="askagain" class="gradient-button purple full">Ask Again</button> <button id="newquestion" class="gradient-button purple full">New Q</button> <button id="share" class="gradient-button purple full">Share Results</button> <button id="tweet" class="gradient-button purple full">Tweet Results</button> </div>
  • 16. Some CSS3 for Buttons .gradient-button { display: inline-block; outline: none; cursor: pointer; text-align: center; text-decoration: none; font: 15px/100% Arial, Helvetica, sans-serif; padding: .5em 2em .55em; text-shadow: 0 1px 1px rgba(0,0,0,.3); -webkit-border-radius: .5em; border-radius: .5em; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2); box-shadow: 0 1px 2px rgba(0,0,0,.2); } .gradient-button:active { position: relative; top: 1px; }
  • 17. Make a Purple Button .purple { color: #fef4e9; border: solid 1px #551A8B; background: #8A2BE2; background: -webkit-gradient(linear, left top, left bottom, from(#8A2BE2), to(#551A8B)); } .purple:active { color: #fef4e9; background: -webkit-gradient(linear, left top, left bottom, from(#551A8B), to(#694489)); }
  • 18. The JavaScript • Clean up index.js – It has some extra stuff we don’t need • Add zepto.js for easy manipulation – You can use whatever framework you like • Add social.js for our Social Framework Plugin – This is iOS specific
  • 19. Some More JavaScript var answers = ['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes – definitely', 'You may rely on it', 'As I see it, yes', 'Most likely’]; function getAnswer() { $('#asking').hide(); $('#answering').show(); var selectedResponse = Math.floor((Math.random()*20)); $('#answer').text(answers[selectedResponse]); } function newQuestion() { $('#question').val(""); $('#asking').show(); $('#answering').hide(); }
  • 20. Plugins? No problem. • Place the m and h files into the plugins folder • Copy the js file into the www/js folder • Add extra frameworks to the project • Add a line to config.xml
  • 21. Use the Plugin with JavaScript function fbResults() { var qa = $('#question').val() + " " + $('#answer').text() + " #magic8"; SocialFrameworkPlugin.postToFacebook( shareSuccess, shareError, qa); } function shareSuccess() { console.log("Sharing Successful"); } function shareError() { console.log("Error sharing"); }
  • 22. Icons and Splash Screens
  • 24. Adobe PhoneGap Build • Streamline the process of building for other platforms • No need to own a mac to build an iOS app • Free for open source projects • Private repositories require a subscription – $12/month for 3 private apps
  • 26. Questions? Clay Ewing www.claytical.com www.github.com/claytical c.ewing@miami.edu @claytical