SlideShare uma empresa Scribd logo
1 de 39
Hybrid Apps with
Ionic Framework
AAYUSH SHRESTHA
AAYUSHONWEB@GMAIL.COM
CURRENTLY
◦ Head of UI/UX Architecture and Design at Viveka Health
◦ Co Founder of Lishn.com
PREVIOUSLY
◦ Chief of Design at nLocate
Find Me At:
aayushonweb@gmail.com
fb.me/ShresthaAayush
@AayushShrestha
AAYUSH
SHRESTHA
We all want to be
mobile app
developers.
.. and with the web technologies that
you are already familiar with.
Native Apps
Platform specific
Respective development tools
Time consuming to develop
Development is expensive
Performance is best
Platform Independent
HTML5, CSS3, JavaScript
Quick Development
Direct access to native APIs
Limited Performance
Hybrid Apps
Apache Cordova is a platform to build
mobile applications using HTML5, CSS
and JavaScript.
Cordova is an application
container
◦ You develop a web app.
◦ Cordova will take that web app and bundle it in a native
app.
◦ A Cordova app opens a webview (an instance of a web
browser) where the web app will operate
Cordova is an application
container
Supports most mobile platforms
◦ Android
◦ iOS
◦ Windows
◦ Blackberry OS
◦ Ubuntu OS
◦ Firefox OS
◦ LG Web OS
◦ FireOS
BUILD ONCE.
RUN AT ALL
PLATFORMS.
Cordova gives access to Native
APIs
◦ Battery Status
◦ Camera
◦ Contacts
◦ Device
◦ Device Orientation
◦ Dialogs
◦ File System
◦ Geolocation
◦ Media Capture
◦ Network Information
◦ Splashscreen
◦ Statusbar
◦ Vibration
Cordova is Free, Open Source and
Extensible
◦ Free and Open Source
◦ Cordova provides ways to develop your own plugins
that can interact with the device and/or the platform’s
SDK so you can build more advanced native features
What is PhoneGap?
◦ Cordova was initially called PhoneGap when it was
developed at Nitobi Labs
◦ Adobe bought PhoneGap.
◦ Then Adobe donated the project to Apache Software
Foundation and it was renamed to Cordova
◦ Now, PhoneGap is a distribution of Cordova that is
managed by Adobe.
◦ Phonegap is also free and open source
◦ Analogous to Chromium engine and Google Chrome
Ionic Framework is a front-end
framework built on top of Cordova with
Angular JS.
Ionic Framework
◦ Front end framework for hybrid mobile apps
◦ Angular JS to build mobile web application
◦ Cordova to create, build, run and deploy native apps
◦ UI components that will make your apps look more like
native apps
◦ Ionic-CLI that makes building, running, testing and
deploying apps easier
Lets Get Started!
$ npm install –g cordova
$ npm install –g ionic@1.3
INSTALL CORDOVA AND IONIC FRAMEWORK
$ ionic start myApp blank
$ ionic start myApp tabs
$ ionic start myApp sideMenu
START A PROJECT WITH STARTER TEMPLATE
$ ionic serve
$ ionic serve --lab
BROWSER TESTING
$ ionic build android
$ ionic emulate android
$ionic run android
BUILD THE APP AND TEST IN SIMULATOR.
REPLACE ANDROID WITH IOS TO BUILD AND TEST IN IOS.
* ANDROID SIMULATOR MUST BE INSTALLED
CSS UI Components
IONICONS
Platform Specific
Customization
Platform specific CSS classes
Class Name Platform
platform-browser When app is working on a browser
platform-cordova When app is working on any device
Platform-ios When the device is iOS
Platform-android When the device is android
Platform-ipad When the device is iPad
Platform-
windowsphone
When the device is android phone
Dynamic Templates
Dynamic Templates : Merges
Folder
You can have a special folder named merges in the same level where www folder
resides
Merges folder can have directories for android and ios that can override www
folder
Native Features : Camera
$ cordova plugin add
cordova-plugin-camera
ADD CAMERA PLUGIN FOR CORDOVA
HTTPS://CORDOVA.APACHE.ORG/DOCS/EN/LATEST/REFERENC
E/CORDOVA-PLUGIN-CAMERA/
$ bower install ngCordova
INSTALL NGCORDOVA LIBRARY. NGCORDVA IS AN ANGULAR
LIBRARY THAT HELPS YOU PROPERLY USE CORDOVA PLUGINS
IN ANGULAR.
HTTP://NGCORDOVA.COM/
Add a new tab in tabs.html
Create a new route in app.js
Create a CameraCtrl in
controllers.js
Notice: There is another parameter $cordovaCamera in the controller function.
$cordovaCamera is a service provided by ngCordova that helps you access the device
camera
Create a new template tab-
camera.html
The template has two buttons. One for taking phot. Another for Choosing Photo from
Gallery.
The <img> element shows the image selected or clicked.
In CameraCtrl.js, write takePhoto
function
Options object defines various options to start the camera, like the width and height of image,
source type (here Camera)
$cordovaCamera.getPicture() function starts the camera.
From the imageData received from camera, we create an imageURI which is used in template to view
the image.
In CameraCtrl.js, write
choosePhoto function
Similar to takePhoto function
But in options object, for sourceType, we use Camera.PictureSourceType.PHOTOLIBRARY
Icons and Splashscreens
Download and edit Icons and
Splashscreen PSDs
EDIT WITH YOUR LOGO AND PUT THEM IN RESOURCES
FOLDER
$ ionic resources --icon
$ ionic resource --splash
$ionic resource
CREATE ICONS AND SPLASHSCREENS

Mais conteúdo relacionado

Mais procurados

Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Mark Leusink
 
Cordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsCordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsEddie Lau
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsSasha dos Santos
 
Developing Hybrid Applications with IONIC
Developing Hybrid Applications with IONICDeveloping Hybrid Applications with IONIC
Developing Hybrid Applications with IONICFuat Buğra AYDIN
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkCihad Horuzoğlu
 
Ionic Crash Course! Hack-a-ton SF
Ionic Crash Course! Hack-a-ton SFIonic Crash Course! Hack-a-ton SF
Ionic Crash Course! Hack-a-ton SFLukas Ruebbelke
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSZvika Epstein
 
Hybrid mobile and Ionic
Hybrid mobile and IonicHybrid mobile and Ionic
Hybrid mobile and IonicLiju Pillai
 
Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Oleksandr Tryshchenko
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentMalan Amarasinghe
 
Getting started with the Ionic Framework
Getting started with the Ionic FrameworkGetting started with the Ionic Framework
Getting started with the Ionic FrameworkAnuradha Weeraman
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicKadhem Soltani
 
Introduction to Ionic framework
Introduction to Ionic frameworkIntroduction to Ionic framework
Introduction to Ionic frameworkShyjal Raazi
 
Ionic CLI Adventures
Ionic CLI AdventuresIonic CLI Adventures
Ionic CLI AdventuresJuarez Filho
 
Ionic Framework - Intro to Hybrid Mobile Application Development
Ionic Framework - Intro to Hybrid Mobile Application DevelopmentIonic Framework - Intro to Hybrid Mobile Application Development
Ionic Framework - Intro to Hybrid Mobile Application DevelopmentMax Kaplan
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicErmias Bayu
 
Intro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular jsIntro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular jsHector Iribarne
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesJacob Friesen
 

Mais procurados (20)

Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Cordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ CodeaholicsCordova, Angularjs & Ionic @ Codeaholics
Cordova, Angularjs & Ionic @ Codeaholics
 
Intro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile ApplicationsIntro to Ionic for Building Hybrid Mobile Applications
Intro to Ionic for Building Hybrid Mobile Applications
 
Developing Hybrid Applications with IONIC
Developing Hybrid Applications with IONICDeveloping Hybrid Applications with IONIC
Developing Hybrid Applications with IONIC
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 
Ionic Crash Course! Hack-a-ton SF
Ionic Crash Course! Hack-a-ton SFIonic Crash Course! Hack-a-ton SF
Ionic Crash Course! Hack-a-ton SF
 
Hybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJSHybrid vs. Native app - Ionic Framework with AngularJS
Hybrid vs. Native app - Ionic Framework with AngularJS
 
Hybrid mobile and Ionic
Hybrid mobile and IonicHybrid mobile and Ionic
Hybrid mobile and Ionic
 
Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3Mobile Applications with Angular 4 and Ionic 3
Mobile Applications with Angular 4 and Ionic 3
 
IONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App DevelopmentIONIC - Hybrid Mobile App Development
IONIC - Hybrid Mobile App Development
 
Getting started with the Ionic Framework
Getting started with the Ionic FrameworkGetting started with the Ionic Framework
Getting started with the Ionic Framework
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 
Introduction to Ionic framework
Introduction to Ionic frameworkIntroduction to Ionic framework
Introduction to Ionic framework
 
Ionic CLI Adventures
Ionic CLI AdventuresIonic CLI Adventures
Ionic CLI Adventures
 
Ionic Framework - Intro to Hybrid Mobile Application Development
Ionic Framework - Intro to Hybrid Mobile Application DevelopmentIonic Framework - Intro to Hybrid Mobile Application Development
Ionic Framework - Intro to Hybrid Mobile Application Development
 
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionicHybrid Mobile Development with Apache Cordova,AngularJs and ionic
Hybrid Mobile Development with Apache Cordova,AngularJs and ionic
 
Intro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular jsIntro to mobile apps with the ionic framework & angular js
Intro to mobile apps with the ionic framework & angular js
 
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without CompromisesIonic Mobile Applications - Hybrid Mobile Applications Without Compromises
Ionic Mobile Applications - Hybrid Mobile Applications Without Compromises
 

Destaque

Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstRaymond Camden
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with IonicMorris Singer
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Serge van den Oever
 
Mobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJSMobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJSCarlo Bonamico
 
building HTML hybrid app
 with ionic
building HTML hybrid app
 with ionicbuilding HTML hybrid app
 with ionic
building HTML hybrid app
 with ionicNakano Kyohei
 
Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platformChamil Madusanka
 
Building Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and IonicBuilding Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and IonicYounes Adounis
 
Step by step guide to build ionic hybrid app using cordova android
Step by step guide to build ionic hybrid app using cordova androidStep by step guide to build ionic hybrid app using cordova android
Step by step guide to build ionic hybrid app using cordova androidswagat parida
 
Hybrid mobile app development
Hybrid mobile app developmentHybrid mobile app development
Hybrid mobile app developmentChamil Madusanka
 
Effective Communication Of Data Inspired by Stephen Few
Effective Communication Of Data Inspired by Stephen FewEffective Communication Of Data Inspired by Stephen Few
Effective Communication Of Data Inspired by Stephen FewCory Grenier
 
Rethinking Mobile with Ionic
Rethinking Mobile with IonicRethinking Mobile with Ionic
Rethinking Mobile with IonicMike Hartington
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)ColdFusionConference
 
Ionic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf SteroidenIonic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf SteroidenHendrik Lösch
 
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
 

Destaque (16)

Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Building Mobile Applications with Ionic
Building Mobile Applications with IonicBuilding Mobile Applications with Ionic
Building Mobile Applications with Ionic
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript
 
Mobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJSMobile HTML5 websites and Hybrid Apps with AngularJS
Mobile HTML5 websites and Hybrid Apps with AngularJS
 
Workshop 15: Ionic framework
Workshop 15: Ionic frameworkWorkshop 15: Ionic framework
Workshop 15: Ionic framework
 
building HTML hybrid app
 with ionic
building HTML hybrid app
 with ionicbuilding HTML hybrid app
 with ionic
building HTML hybrid app
 with ionic
 
Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platform
 
Building Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and IonicBuilding Hybrid Apps with AngularJS and Ionic
Building Hybrid Apps with AngularJS and Ionic
 
Hybrid mobile app
Hybrid mobile appHybrid mobile app
Hybrid mobile app
 
Step by step guide to build ionic hybrid app using cordova android
Step by step guide to build ionic hybrid app using cordova androidStep by step guide to build ionic hybrid app using cordova android
Step by step guide to build ionic hybrid app using cordova android
 
Hybrid mobile app development
Hybrid mobile app developmentHybrid mobile app development
Hybrid mobile app development
 
Effective Communication Of Data Inspired by Stephen Few
Effective Communication Of Data Inspired by Stephen FewEffective Communication Of Data Inspired by Stephen Few
Effective Communication Of Data Inspired by Stephen Few
 
Rethinking Mobile with Ionic
Rethinking Mobile with IonicRethinking Mobile with Ionic
Rethinking Mobile with Ionic
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)
 
Ionic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf SteroidenIonic 2 - Hybridapps auf Steroiden
Ionic 2 - Hybridapps auf Steroiden
 
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
 

Semelhante a Workshop on Hybrid App Development with Ionic Framework

Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
Cross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceCross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceAll Things Open
 
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Hazem Saleh
 
Cordova Tutorial
Cordova TutorialCordova Tutorial
Cordova TutorialJacky Chen
 
Hybrid app development frameworks
Hybrid app development frameworksHybrid app development frameworks
Hybrid app development frameworksSquash Apps Pvt Ltd
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Phonegap android
Phonegap androidPhonegap android
Phonegap androidumesh patil
 
Introduction to the cordova framework for developing mobile apps1
Introduction to the cordova framework for developing mobile apps1Introduction to the cordova framework for developing mobile apps1
Introduction to the cordova framework for developing mobile apps1Lisa Brown
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 
Hybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupHybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupSanjay Patel
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In ActionHazem Saleh
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap InsightsMonaca
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application developmentKunjan Thakkar
 

Semelhante a Workshop on Hybrid App Development with Ionic Framework (20)

Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
Cross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceCross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open Source
 
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
 
Cordova Tutorial
Cordova TutorialCordova Tutorial
Cordova Tutorial
 
Ionic
IonicIonic
Ionic
 
An overview of Ionic
An overview of IonicAn overview of Ionic
An overview of Ionic
 
Hybrid app development frameworks
Hybrid app development frameworksHybrid app development frameworks
Hybrid app development frameworks
 
Headlessdrupalcordovaapp
HeadlessdrupalcordovaappHeadlessdrupalcordovaapp
Headlessdrupalcordovaapp
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Phonegap android
Phonegap androidPhonegap android
Phonegap android
 
Apache cordova
Apache cordovaApache cordova
Apache cordova
 
Introduction to the cordova framework for developing mobile apps1
Introduction to the cordova framework for developing mobile apps1Introduction to the cordova framework for developing mobile apps1
Introduction to the cordova framework for developing mobile apps1
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
Hybrid Mobile Apps - Meetup
Hybrid Mobile Apps - MeetupHybrid Mobile Apps - Meetup
Hybrid Mobile Apps - Meetup
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action[Devoxx Morocco 2015] Apache Cordova In Action
[Devoxx Morocco 2015] Apache Cordova In Action
 
Ionic2 First Lesson of Four
Ionic2 First Lesson of FourIonic2 First Lesson of Four
Ionic2 First Lesson of Four
 
PhoneGap/Cordova
PhoneGap/CordovaPhoneGap/Cordova
PhoneGap/Cordova
 
Cordova and PhoneGap Insights
Cordova and PhoneGap InsightsCordova and PhoneGap Insights
Cordova and PhoneGap Insights
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 

Mais de Aayush Shrestha

Design and UX. An Introduction
Design and UX. An IntroductionDesign and UX. An Introduction
Design and UX. An IntroductionAayush Shrestha
 
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017Aayush Shrestha
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocateAayush Shrestha
 
JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6Aayush Shrestha
 
Facebook Open Graph API and How To Use It
Facebook Open Graph API and How To Use ItFacebook Open Graph API and How To Use It
Facebook Open Graph API and How To Use ItAayush Shrestha
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular jsAayush Shrestha
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesA Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesAayush Shrestha
 
XBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASAXBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASAAayush Shrestha
 
XBRL Implementation for Financial Reporting
XBRL Implementation for Financial ReportingXBRL Implementation for Financial Reporting
XBRL Implementation for Financial ReportingAayush Shrestha
 

Mais de Aayush Shrestha (9)

Design and UX. An Introduction
Design and UX. An IntroductionDesign and UX. An Introduction
Design and UX. An Introduction
 
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
 
JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6
 
Facebook Open Graph API and How To Use It
Facebook Open Graph API and How To Use ItFacebook Open Graph API and How To Use It
Facebook Open Graph API and How To Use It
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesA Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With Disabilities
 
XBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASAXBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASA
 
XBRL Implementation for Financial Reporting
XBRL Implementation for Financial ReportingXBRL Implementation for Financial Reporting
XBRL Implementation for Financial Reporting
 

Último

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 

Último (20)

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 

Workshop on Hybrid App Development with Ionic Framework

  • 1. Hybrid Apps with Ionic Framework AAYUSH SHRESTHA AAYUSHONWEB@GMAIL.COM
  • 2. CURRENTLY ◦ Head of UI/UX Architecture and Design at Viveka Health ◦ Co Founder of Lishn.com PREVIOUSLY ◦ Chief of Design at nLocate Find Me At: aayushonweb@gmail.com fb.me/ShresthaAayush @AayushShrestha AAYUSH SHRESTHA
  • 3. We all want to be mobile app developers.
  • 4.
  • 5.
  • 6. .. and with the web technologies that you are already familiar with.
  • 7. Native Apps Platform specific Respective development tools Time consuming to develop Development is expensive Performance is best Platform Independent HTML5, CSS3, JavaScript Quick Development Direct access to native APIs Limited Performance Hybrid Apps
  • 8. Apache Cordova is a platform to build mobile applications using HTML5, CSS and JavaScript.
  • 9. Cordova is an application container ◦ You develop a web app. ◦ Cordova will take that web app and bundle it in a native app. ◦ A Cordova app opens a webview (an instance of a web browser) where the web app will operate
  • 10. Cordova is an application container
  • 11. Supports most mobile platforms ◦ Android ◦ iOS ◦ Windows ◦ Blackberry OS ◦ Ubuntu OS ◦ Firefox OS ◦ LG Web OS ◦ FireOS BUILD ONCE. RUN AT ALL PLATFORMS.
  • 12. Cordova gives access to Native APIs ◦ Battery Status ◦ Camera ◦ Contacts ◦ Device ◦ Device Orientation ◦ Dialogs ◦ File System ◦ Geolocation ◦ Media Capture ◦ Network Information ◦ Splashscreen ◦ Statusbar ◦ Vibration
  • 13. Cordova is Free, Open Source and Extensible ◦ Free and Open Source ◦ Cordova provides ways to develop your own plugins that can interact with the device and/or the platform’s SDK so you can build more advanced native features
  • 14. What is PhoneGap? ◦ Cordova was initially called PhoneGap when it was developed at Nitobi Labs ◦ Adobe bought PhoneGap. ◦ Then Adobe donated the project to Apache Software Foundation and it was renamed to Cordova ◦ Now, PhoneGap is a distribution of Cordova that is managed by Adobe. ◦ Phonegap is also free and open source ◦ Analogous to Chromium engine and Google Chrome
  • 15. Ionic Framework is a front-end framework built on top of Cordova with Angular JS.
  • 16. Ionic Framework ◦ Front end framework for hybrid mobile apps ◦ Angular JS to build mobile web application ◦ Cordova to create, build, run and deploy native apps ◦ UI components that will make your apps look more like native apps ◦ Ionic-CLI that makes building, running, testing and deploying apps easier
  • 18. $ npm install –g cordova $ npm install –g ionic@1.3 INSTALL CORDOVA AND IONIC FRAMEWORK
  • 19. $ ionic start myApp blank $ ionic start myApp tabs $ ionic start myApp sideMenu START A PROJECT WITH STARTER TEMPLATE
  • 20. $ ionic serve $ ionic serve --lab BROWSER TESTING
  • 21. $ ionic build android $ ionic emulate android $ionic run android BUILD THE APP AND TEST IN SIMULATOR. REPLACE ANDROID WITH IOS TO BUILD AND TEST IN IOS. * ANDROID SIMULATOR MUST BE INSTALLED
  • 25. Platform specific CSS classes Class Name Platform platform-browser When app is working on a browser platform-cordova When app is working on any device Platform-ios When the device is iOS Platform-android When the device is android Platform-ipad When the device is iPad Platform- windowsphone When the device is android phone
  • 27. Dynamic Templates : Merges Folder You can have a special folder named merges in the same level where www folder resides Merges folder can have directories for android and ios that can override www folder
  • 29. $ cordova plugin add cordova-plugin-camera ADD CAMERA PLUGIN FOR CORDOVA HTTPS://CORDOVA.APACHE.ORG/DOCS/EN/LATEST/REFERENC E/CORDOVA-PLUGIN-CAMERA/
  • 30. $ bower install ngCordova INSTALL NGCORDOVA LIBRARY. NGCORDVA IS AN ANGULAR LIBRARY THAT HELPS YOU PROPERLY USE CORDOVA PLUGINS IN ANGULAR. HTTP://NGCORDOVA.COM/
  • 31. Add a new tab in tabs.html
  • 32. Create a new route in app.js
  • 33. Create a CameraCtrl in controllers.js Notice: There is another parameter $cordovaCamera in the controller function. $cordovaCamera is a service provided by ngCordova that helps you access the device camera
  • 34. Create a new template tab- camera.html The template has two buttons. One for taking phot. Another for Choosing Photo from Gallery. The <img> element shows the image selected or clicked.
  • 35. In CameraCtrl.js, write takePhoto function Options object defines various options to start the camera, like the width and height of image, source type (here Camera) $cordovaCamera.getPicture() function starts the camera. From the imageData received from camera, we create an imageURI which is used in template to view the image.
  • 36. In CameraCtrl.js, write choosePhoto function Similar to takePhoto function But in options object, for sourceType, we use Camera.PictureSourceType.PHOTOLIBRARY
  • 38. Download and edit Icons and Splashscreen PSDs EDIT WITH YOUR LOGO AND PUT THEM IN RESOURCES FOLDER
  • 39. $ ionic resources --icon $ ionic resource --splash $ionic resource CREATE ICONS AND SPLASHSCREENS