SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
ACCESSING NATIVE APIS FROM
          SENCHA TOUCH
                            James Pearce
                            @jamespearce



Wednesday, November 2, 11
Web apps are
                             the future




Wednesday, November 2, 11
Native apps are
                             the present




Wednesday, November 2, 11
Native   Web

                Cross-platform       ✘      ✔

                        Linkable     ✘      ✔

                  Discoverable       ✔      ✘

                    Device APIs      ✔      ✘




Wednesday, November 2, 11
Native   Web   Hybrid

                Cross-platform       ✘      ✔       ✔

                        Linkable     ✘      ✔       ✔

                  Discoverable       ✔      ✘       ✔

                    Device APIs      ✔      ✘       ✔




Wednesday, November 2, 11
What is a hybrid app?




Wednesday, November 2, 11
Web
           Site


                            sites

                                    Web
                                    apps

                                             Native
                                             apps
           App




                                           Nativeness



Wednesday, November 2, 11
Web
           Site


                            sites
                                    Web
                                    apps
                                           Hybrid
                                            apps
                                                      Native
                                                      apps
           App




                                                    Nativeness



Wednesday, November 2, 11
Camera         WebFont        Video    Audio    Graphics
                                                                         HTTP
            Location
                                      CSS Styling & Layout               AJAX
            Contacts
                                                                        Events
                SMS                          JavaScript
                                                                        Sockets
          Orientation
                                           Semantic HTML                 SSL
                Gyro

                            File Systems      Workers &
                                                            Cross-App
                             Databases          Parallel
                                                            Messaging
                            App Caches        Processing




Wednesday, November 2, 11
WebView
             Camera         WebFont        Video    Audio    Graphics
                                                                         HTTP
            Location
                                      CSS Styling & Layout               AJAX
            Contacts
                                                                        Events
                SMS                          JavaScript
                                                                        Sockets
          Orientation
                                           Semantic HTML                 SSL
                Gyro

                            File Systems      Workers &
                                                            Cross-App
                             Databases          Parallel
                                                            Messaging
                            App Caches        Processing




Wednesday, November 2, 11
Native Wrapper

                                                      WebView
             Camera         WebFont        Video    Audio    Graphics
                                                                         HTTP
            Location
                                      CSS Styling & Layout               AJAX
            Contacts
                                                                        Events
                SMS                          JavaScript
                                                                        Sockets
          Orientation
                                           Semantic HTML                 SSL
                Gyro

                            File Systems      Workers &
                                                            Cross-App
                             Databases          Parallel
                                                            Messaging
                            App Caches        Processing




Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
Sencha Touch
                              Packager
                               Edmund Leung,
                              Product Manager




Wednesday, November 2, 11
Native Wrapper

                                                      WebView
             Camera         WebFont        Video    Audio    Graphics
                                                                         HTTP
            Location
                                      CSS Styling & Layout               AJAX
            Contacts
                                                                        Events
                SMS                          JavaScript
                                                                        Sockets
          Orientation
                                           Semantic HTML                 SSL
                Gyro

                            File Systems      Workers &
                                                            Cross-App
                             Databases          Parallel
                                                            Messaging
                            App Caches        Processing




Wednesday, November 2, 11
Native Wrapper

                                                      WebView
             Camera         WebFont        Video    Audio    Graphics
                                                                         HTTP
            Location
                                      CSS Styling & Layout               AJAX
            Contacts
                                                                        Events
                SMS                          JavaScript
                                                                        Sockets
          Orientation
                                           Semantic HTML                 SSL
                Gyro

                            File Systems      Workers &
                                                            Cross-App
                             Databases          Parallel
                                                            Messaging
                            App Caches        Processing




Wednesday, November 2, 11
Device Access
Wednesday, November 2, 11
Media Capture (HTML)      Media Capture (API)
               Battery status            Application Registration
               Contacts                  Calendar
               Messaging (SMS, MMS...)   Feature Permissions
               Network Information API   Sensor API
                                         Vibration API
                                         Menu API
               Audio Volume
                                         Permissions for APIs
               Beep
               Gallery
               Systems info and events
               Tasks


Wednesday, November 2, 11
Accelerometer       APDU (SmartCard)
               Orientation         Bluetooth
               Camera              Crypto
               DeviceStatus        DLNA
               Filesystem          Server Push
               Messaging           Sensor
               Geolocation         Telephony
               PIM 
               Contacts
               Calendar
               Tasks
               DeviceInteraction

Wednesday, November 2, 11
Wednesday, November 2, 11
Telephony
                            Messaging
                            Contacts
                            Clock
                            Camera
                            Filesystem
                            Calculator
                            Device Status
                            Settings
                            Accelerometer
                            Mouse Lock
                            Maps

Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
Developer choice is
                            limited by options




Wednesday, November 2, 11
Native Wrapper

                                                      WebView
             Camera         WebFont        Video    Audio    Graphics
                                                                         HTTP
            Location
                                      CSS Styling & Layout               AJAX
            Contacts
                                                                        Events
                SMS                          JavaScript
                                                                        Sockets
          Orientation
                                           Semantic HTML                 SSL
                Gyro

                            File Systems      Workers &
                                                            Cross-App
                             Databases          Parallel
                                                            Messaging
                            App Caches        Processing




Wednesday, November 2, 11
PhoneGap




Wednesday, November 2, 11
Apache




Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
Accelerometer                                  Events
              Tap into the device’s motion sensor.           Hook into native events through JavaScript.


              Camera                                         File
              Capture a photo using the device's camera.     Hook into native file system through
                                                             JavaScript.

              Capture
              Capture media files using device's media        Geolocation
              capture applications.                          Make your application location aware.


              Compass                                        Media
              Obtain the direction the device is pointing.   Record and play back audio files.


              Connection                                     Notification
              Quickly check the network state, and           Visual, audible, and tactile device
              cellular network information.                  notifications.


              Contacts                                       Storage
              Work with the devices contact database.        Hook into the device’s native storage
                                                             options.

              Device
              Gather device specific information.


Wednesday, November 2, 11
Project Setup




Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
PhoneGap.plist




Wednesday, November 2, 11
Wednesday, November 2, 11
Wednesday, November 2, 11
AndroidManifest.xml




Wednesday, November 2, 11
Project Setup




Wednesday, November 2, 11
Accelerometer                                  Events
              Tap into the device’s motion sensor.           Hook into native events through JavaScript.


              Camera                                         File
              Capture a photo using the device's camera.     Hook into native file system through
                                                             JavaScript.

              Capture
              Capture media files using device's media        Geolocation
              capture applications.                          Make your application location aware.


              Compass                                        Media
              Obtain the direction the device is pointing.   Record and play back audio files.


              Connection                                     Notification
              Quickly check the network state, and           Visual, audible, and tactile device
              cellular network information.                  notifications.


              Contacts                                       Storage
              Work with the devices contact database.        Hook into the device’s native storage
                                                             options.

              Device
              Gather device specific information.


Wednesday, November 2, 11
Camera

                            navigator.camera.getPicture(

                                 function(imageData) {
                                 },

                                 function (message) {
                                 },

                                 {} //options

                            );



Wednesday, November 2, 11
Contacts

                            navigator.contacts.create(
                              {}
                            ).save();


                            navigator.contacts.find(
                               contactFields,
                               function(){},
                               function(){},
                               {}
                            );



Wednesday, November 2, 11
Demo




Wednesday, November 2, 11
AdPlugin/               LocalNotification/
                    ApplicationPreferences/           Localizable/
                         AudioEncode/                 MapKitPlug/
                         AudioRecord/               NativeControls/
                             Badge/                 NotificationEx/
                      BarcodeScanner/                PayPalPlugin/
                      BundleFileReader/           PowerManagement/
                         ChildBrowser/                PrintPlugin/
                       ClipboardPlugin/
                          DatePicker/
                                        Plugins         Prompt/
                                                    SMSComposer/
                       EmailComposer/                 ScreenShot/
                         FileUploader/              ShareKitPlugin/
                          GapSocket/                  SoundPlug/
                         Globalization/             SplashScreen/
                          HockeyApp/                   TestFlight/
                   InAppPurchaseManager/                 Torch/
                           Keychain/                 VolumeSlider/




Wednesday, November 2, 11
Caveats




Wednesday, November 2, 11
Obfuscation != security




                     +      =

Wednesday, November 2, 11
Quirks




                              ...
Wednesday, November 2, 11
Android        iOS
                            phonegap.js   phonegap.js   ...
Wednesday, November 2, 11
Avoid start race
               document.addEventListener(
                  "deviceready", app.mainLaunch, false
               );

               new Ext.Application({
                 launch: function() {
                    this.launched = true;
                    this.mainLaunch();
                 },
                 mainLaunch: function() {
                    if (!device || !this.launched) {return;}
                    ...
                 }
               });

Wednesday, November 2, 11
Wouldn’t it be
                             great if...




Wednesday, November 2, 11
Further...

                             http://sencha.com/x/cy

                             http://sencha.com/x/de


                            BlackBerry WebWorks APIs
                                 3:50pm - 4:30pm



Wednesday, November 2, 11
THANKS
                              James Pearce
                              @jamespearce



Wednesday, November 2, 11

Weitere ähnliche Inhalte

Ähnlich wie Accessing Native APIs from Touch

An Intro to Mobile HTML5
An Intro to Mobile HTML5An Intro to Mobile HTML5
An Intro to Mobile HTML5
James Pearce
 
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
Microsoft
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11
영호 라
 
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Shreeraj Shah
 
6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services
GaryYoung
 
Building cross platform mobile web apps
Building cross platform mobile web appsBuilding cross platform mobile web apps
Building cross platform mobile web apps
James Pearce
 
Build and Deploy on OpenShift
Build and Deploy on OpenShiftBuild and Deploy on OpenShift
Build and Deploy on OpenShift
Xavier Coulon
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
James Pearce
 
Community Code: Pega Mobile
Community Code: Pega MobileCommunity Code: Pega Mobile
Community Code: Pega Mobile
Sencha
 
Glass Fish Mobility Platform Santiago Pericas Geersten V2
Glass Fish Mobility Platform Santiago Pericas Geersten V2Glass Fish Mobility Platform Santiago Pericas Geersten V2
Glass Fish Mobility Platform Santiago Pericas Geersten V2
Eduardo Pelegri-Llopart
 

Ähnlich wie Accessing Native APIs from Touch (20)

An Intro to Mobile HTML5
An Intro to Mobile HTML5An Intro to Mobile HTML5
An Intro to Mobile HTML5
 
Distributed Shared Memory on Ericsson Labs
Distributed Shared Memory on Ericsson LabsDistributed Shared Memory on Ericsson Labs
Distributed Shared Memory on Ericsson Labs
 
A Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 RevolutionA Snapshot of the Mobile HTML5 Revolution
A Snapshot of the Mobile HTML5 Revolution
 
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
MIX11アップデート ~Windows Phone 7, Silverlight 5, IE9, HTML5~ 前編
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11
 
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
Next Generation Web Attacks – HTML 5, DOM(L3) and XHR(L2)
 
6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services
 
HTML5, Silverlight & Kinect
HTML5, Silverlight & KinectHTML5, Silverlight & Kinect
HTML5, Silverlight & Kinect
 
Cluedin JavaOne 2009
Cluedin JavaOne 2009Cluedin JavaOne 2009
Cluedin JavaOne 2009
 
Building cross platform mobile web apps
Building cross platform mobile web appsBuilding cross platform mobile web apps
Building cross platform mobile web apps
 
HTML5: State of the Union
HTML5: State of the UnionHTML5: State of the Union
HTML5: State of the Union
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
Build and Deploy on OpenShift
Build and Deploy on OpenShiftBuild and Deploy on OpenShift
Build and Deploy on OpenShift
 
A Lap Around Silverlight 5
A Lap Around Silverlight 5A Lap Around Silverlight 5
A Lap Around Silverlight 5
 
Mesh-Enabled Web Applications
Mesh-Enabled Web ApplicationsMesh-Enabled Web Applications
Mesh-Enabled Web Applications
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
02 Ms Online Identity Session 1
02 Ms Online Identity   Session 102 Ms Online Identity   Session 1
02 Ms Online Identity Session 1
 
Community Code: Pega Mobile
Community Code: Pega MobileCommunity Code: Pega Mobile
Community Code: Pega Mobile
 
Glass Fish Mobility Platform Santiago Pericas Geersten V2
Glass Fish Mobility Platform Santiago Pericas Geersten V2Glass Fish Mobility Platform Santiago Pericas Geersten V2
Glass Fish Mobility Platform Santiago Pericas Geersten V2
 
T04f
T04fT04f
T04f
 

Mehr von Sencha

Mehr von Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 

Kürzlich hochgeladen

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
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Accessing Native APIs from Touch

  • 1. ACCESSING NATIVE APIS FROM SENCHA TOUCH James Pearce @jamespearce Wednesday, November 2, 11
  • 2. Web apps are the future Wednesday, November 2, 11
  • 3. Native apps are the present Wednesday, November 2, 11
  • 4. Native Web Cross-platform ✘ ✔ Linkable ✘ ✔ Discoverable ✔ ✘ Device APIs ✔ ✘ Wednesday, November 2, 11
  • 5. Native Web Hybrid Cross-platform ✘ ✔ ✔ Linkable ✘ ✔ ✔ Discoverable ✔ ✘ ✔ Device APIs ✔ ✘ ✔ Wednesday, November 2, 11
  • 6. What is a hybrid app? Wednesday, November 2, 11
  • 7. Web Site sites Web apps Native apps App Nativeness Wednesday, November 2, 11
  • 8. Web Site sites Web apps Hybrid apps Native apps App Nativeness Wednesday, November 2, 11
  • 9. Camera WebFont Video Audio Graphics HTTP Location CSS Styling & Layout AJAX Contacts Events SMS JavaScript Sockets Orientation Semantic HTML SSL Gyro File Systems Workers & Cross-App Databases Parallel Messaging App Caches Processing Wednesday, November 2, 11
  • 10. WebView Camera WebFont Video Audio Graphics HTTP Location CSS Styling & Layout AJAX Contacts Events SMS JavaScript Sockets Orientation Semantic HTML SSL Gyro File Systems Workers & Cross-App Databases Parallel Messaging App Caches Processing Wednesday, November 2, 11
  • 11. Native Wrapper WebView Camera WebFont Video Audio Graphics HTTP Location CSS Styling & Layout AJAX Contacts Events SMS JavaScript Sockets Orientation Semantic HTML SSL Gyro File Systems Workers & Cross-App Databases Parallel Messaging App Caches Processing Wednesday, November 2, 11
  • 14. Sencha Touch Packager Edmund Leung, Product Manager Wednesday, November 2, 11
  • 15. Native Wrapper WebView Camera WebFont Video Audio Graphics HTTP Location CSS Styling & Layout AJAX Contacts Events SMS JavaScript Sockets Orientation Semantic HTML SSL Gyro File Systems Workers & Cross-App Databases Parallel Messaging App Caches Processing Wednesday, November 2, 11
  • 16. Native Wrapper WebView Camera WebFont Video Audio Graphics HTTP Location CSS Styling & Layout AJAX Contacts Events SMS JavaScript Sockets Orientation Semantic HTML SSL Gyro File Systems Workers & Cross-App Databases Parallel Messaging App Caches Processing Wednesday, November 2, 11
  • 18. Media Capture (HTML) Media Capture (API) Battery status Application Registration Contacts Calendar Messaging (SMS, MMS...) Feature Permissions Network Information API Sensor API Vibration API Menu API Audio Volume Permissions for APIs Beep Gallery Systems info and events Tasks Wednesday, November 2, 11
  • 19. Accelerometer APDU (SmartCard) Orientation Bluetooth Camera Crypto DeviceStatus DLNA Filesystem Server Push Messaging Sensor Geolocation Telephony PIM  Contacts Calendar Tasks DeviceInteraction Wednesday, November 2, 11
  • 21. Telephony Messaging Contacts Clock Camera Filesystem Calculator Device Status Settings Accelerometer Mouse Lock Maps Wednesday, November 2, 11
  • 24. Developer choice is limited by options Wednesday, November 2, 11
  • 25. Native Wrapper WebView Camera WebFont Video Audio Graphics HTTP Location CSS Styling & Layout AJAX Contacts Events SMS JavaScript Sockets Orientation Semantic HTML SSL Gyro File Systems Workers & Cross-App Databases Parallel Messaging App Caches Processing Wednesday, November 2, 11
  • 30. Accelerometer Events Tap into the device’s motion sensor. Hook into native events through JavaScript. Camera File Capture a photo using the device's camera. Hook into native file system through JavaScript. Capture Capture media files using device's media Geolocation capture applications. Make your application location aware. Compass Media Obtain the direction the device is pointing. Record and play back audio files. Connection Notification Quickly check the network state, and Visual, audible, and tactile device cellular network information. notifications. Contacts Storage Work with the devices contact database. Hook into the device’s native storage options. Device Gather device specific information. Wednesday, November 2, 11
  • 40. Accelerometer Events Tap into the device’s motion sensor. Hook into native events through JavaScript. Camera File Capture a photo using the device's camera. Hook into native file system through JavaScript. Capture Capture media files using device's media Geolocation capture applications. Make your application location aware. Compass Media Obtain the direction the device is pointing. Record and play back audio files. Connection Notification Quickly check the network state, and Visual, audible, and tactile device cellular network information. notifications. Contacts Storage Work with the devices contact database. Hook into the device’s native storage options. Device Gather device specific information. Wednesday, November 2, 11
  • 41. Camera navigator.camera.getPicture( function(imageData) { }, function (message) { }, {} //options ); Wednesday, November 2, 11
  • 42. Contacts navigator.contacts.create( {} ).save(); navigator.contacts.find( contactFields, function(){}, function(){}, {} ); Wednesday, November 2, 11
  • 44. AdPlugin/ LocalNotification/ ApplicationPreferences/ Localizable/ AudioEncode/ MapKitPlug/ AudioRecord/ NativeControls/ Badge/ NotificationEx/ BarcodeScanner/ PayPalPlugin/ BundleFileReader/ PowerManagement/ ChildBrowser/ PrintPlugin/ ClipboardPlugin/ DatePicker/ Plugins Prompt/ SMSComposer/ EmailComposer/ ScreenShot/ FileUploader/ ShareKitPlugin/ GapSocket/ SoundPlug/ Globalization/ SplashScreen/ HockeyApp/ TestFlight/ InAppPurchaseManager/ Torch/ Keychain/ VolumeSlider/ Wednesday, November 2, 11
  • 46. Obfuscation != security + = Wednesday, November 2, 11
  • 47. Quirks ... Wednesday, November 2, 11
  • 48. Android iOS phonegap.js phonegap.js ... Wednesday, November 2, 11
  • 49. Avoid start race document.addEventListener( "deviceready", app.mainLaunch, false ); new Ext.Application({ launch: function() { this.launched = true; this.mainLaunch(); }, mainLaunch: function() { if (!device || !this.launched) {return;} ... } }); Wednesday, November 2, 11
  • 50. Wouldn’t it be great if... Wednesday, November 2, 11
  • 51. Further... http://sencha.com/x/cy http://sencha.com/x/de BlackBerry WebWorks APIs 3:50pm - 4:30pm Wednesday, November 2, 11
  • 52. THANKS James Pearce @jamespearce Wednesday, November 2, 11