SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Integrating
Android Apps
and Web Apps
    Copyright © 2013 CommonsWare, LLC
Objective: Add Value
●   App complements site, does not replace it
    –   Different roles, different scenarios
●   Support multiple screens
    –   Browser on desktop interacting with app on
        device
●   Single source
    –   App and site leverage same Web service back
        end
                       Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Objective
    –   User clicks on link in Web site from mobile
        browser
    –   App pops up in response to that click
●   Examples
    –   Wikipedia
    –   Barcode scanning

                       Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Strategy #1: Regular URL
    –   Site has link to:
        http://www.yourdomain.com/something
    –   What App Has
         ●   Activity to be displayed when that link is clicked
         ●   <intent-filter> advertising supporting VIEW action,
             BROWSABLE category, and that URL



                           Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Strategy #1: Regular URL
    –   What User Sees
         ●   If app not installed: whatever is at that URL
         ●   If app is installed: chooser to use browser or app to
             process the request (unless default already chosen)
    –   Passing Data
         ●   Additional path segments (with pathPrefix)
         ●   Query parameters

                           Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Strategy #1: Regular URL
    –   Limitation: Chooser appears
         ●   User can make your app be the default for this
             particular request, but still sees chooser the first time
         ●   No way to avoid allowing a Web browser to handle
             an HTTP link




                           Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Strategy #2: Custom Scheme
    –   Site has link to: yourscheme://something
    –   What App Has
         ●   Activity to be displayed when that link is clicked
         ●   <intent-filter> advertising supporting VIEW action,
             BROWSABLE category, and that URL complete with
             custom scheme



                           Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Strategy #2: Custom Scheme
    –   Pros
         ●   No chooser!
         ●   Alignment with other operating systems
    –   Cons
         ●   Link is useless without app
         ●   Possible scheme collision


                           Copyright © 2013 CommonsWare, LLC
Launching App from Web
●   Strategy #3: Custom MIME Type
    –   Site serves up content under distinct vendor
        MIME type, that your app handles
    –   Cons
         ●   Effects not immediate: download first, tap on
             notification, then get into your app
         ●   Possible MIME type collisions
●   Overall Con: Assumes Browsing from the
    Device
                          Copyright © 2013 CommonsWare, LLC
Launching App from Desktop Web
●   Strategy #1: QR Codes
    –   App displays QR code, user scans
    –   Requires QR code-scanning app
         ●   Barcode Scanner
         ●   Google Goggles
         ●   Etc.




                         Copyright © 2013 CommonsWare, LLC
Launching App from Desktop Web
●   Strategy #2: Push with GCM
    –   Google Cloud Messaging
    –   Push messages from your server to the device
         ●   In response to actions within your Web app
         ●   In response to other conditions (e.g., reminders)
    –   Free!
    –   Requires Android 2.2+, routing data through
        Google servers
                           Copyright © 2013 CommonsWare, LLC
Launching App from Desktop Web
●   Strategy #2: Push with GCM
    –   Client Side Steps
         ●   Get an API key
         ●   Add GCM JAR to your libs/ directory
         ●   Add permissions
         ●   Register a GCM-supplied BroadcastReceiver
         ●   Implement an IntentService that handles events
         ●   Register the app when run
         ●   Send registration ID to your server
                           Copyright © 2013 CommonsWare, LLC
Launching App from Desktop Web
●   Strategy #2: Push with GCM
    –   Server Side Steps
         ●   Find GCM server library
         ●   Create JSON of payload and other options
         ●   Send notification with payload and registration IDs




                          Copyright © 2013 CommonsWare, LLC
Getting to Web from App
●   Option #1: ACTION_VIEW
    –   Create an ACTION_VIEW Intent, with the URL
        you wish to visit
    –   Pass that to startActivity()
    –   Result: default/chosen browser launched




                      Copyright © 2013 CommonsWare, LLC
Getting to Web from App
●   Option #2: WebView
    –   Embed WebView widget in layout, used by
        activity or fragment
         ●   WebViewFragment available for API Level 11
             fragments
    –   Configure WebView
         ●   e.g., JavaScript disabled by default
    –   Call loadUrl() with your URL
    –   Result: your Web site in your app
                           Copyright © 2013 CommonsWare, LLC
Fancier Stuff
●   Common Web Service
    –   App plus “single page application” or equivalent
    –   Works best with REST-style APIs (vs. SOAP, XML-
        RPC, etc.)
●   OAuth
    –   Common authentication infrastructure for app,
        Web site
    –   App side tends to be a bit clunky
                       Copyright © 2013 CommonsWare, LLC
Fancier Stuff
●   Common Implementation
    –   Use same Web technologies on device as on
        desktop
    –   HTML5 app, PhoneGap, etc.
●   “Throwing” Between Screens
    –   Capture current session state, package up in way
        that other environment can continue

                      Copyright © 2013 CommonsWare, LLC
Speaker Contact
    Information




       SlideShare


       Copyright © 2013 CommonsWare, LLC

Más contenido relacionado

La actualidad más candente

Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Zhentian Wan
 
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddyPWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddySai Kiran Kasireddy
 
Pwa demystified
Pwa demystifiedPwa demystified
Pwa demystifiededynamic
 
Why your website should be a progressive web application (PWA)
Why your website should be a progressive web application (PWA)  Why your website should be a progressive web application (PWA)
Why your website should be a progressive web application (PWA) DBS Interactive
 
Progressive Web Apps: Opera's perspective
Progressive Web Apps: Opera's perspectiveProgressive Web Apps: Opera's perspective
Progressive Web Apps: Opera's perspectiveAndreas Bovens
 
Cinebody 2.2 Update
Cinebody 2.2 UpdateCinebody 2.2 Update
Cinebody 2.2 UpdateTravis Page
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web AppRobert Robinson
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web AppsBill Stavroulakis
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101Daniel Black
 
Platform Play Web Social And Mobile For P Camp09
Platform Play   Web Social And Mobile For P Camp09Platform Play   Web Social And Mobile For P Camp09
Platform Play Web Social And Mobile For P Camp09Sudha Jamthe
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Abdelrahman Omran
 
Introducing Mobile Cross Promotion Framework
Introducing Mobile Cross Promotion FrameworkIntroducing Mobile Cross Promotion Framework
Introducing Mobile Cross Promotion FrameworkXin Hu
 
2011 08-24 mobile web app
2011 08-24  mobile web app2011 08-24  mobile web app
2011 08-24 mobile web appSholto Maud
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web AppsJana Moudrá
 

La actualidad más candente (20)

Progressive web app
Progressive web appProgressive web app
Progressive web app
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Connfa! Progressive web app
Connfa! Progressive web appConnfa! Progressive web app
Connfa! Progressive web app
 
Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)Introduction to Progressive web app (PWA)
Introduction to Progressive web app (PWA)
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
 
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran KasireddyPWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
PWA ( Progressive Web Apps ) - Sai Kiran Kasireddy
 
Pwa demystified
Pwa demystifiedPwa demystified
Pwa demystified
 
Why your website should be a progressive web application (PWA)
Why your website should be a progressive web application (PWA)  Why your website should be a progressive web application (PWA)
Why your website should be a progressive web application (PWA)
 
Progressive Web Apps: Opera's perspective
Progressive Web Apps: Opera's perspectiveProgressive Web Apps: Opera's perspective
Progressive Web Apps: Opera's perspective
 
Cinebody 2.2 Update
Cinebody 2.2 UpdateCinebody 2.2 Update
Cinebody 2.2 Update
 
Joomla page end social share
Joomla page end social shareJoomla page end social share
Joomla page end social share
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web Apps
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101
 
Platform Play Web Social And Mobile For P Camp09
Platform Play   Web Social And Mobile For P Camp09Platform Play   Web Social And Mobile For P Camp09
Platform Play Web Social And Mobile For P Camp09
 
Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016Progressive Web Apps / GDG DevFest - Season 2016
Progressive Web Apps / GDG DevFest - Season 2016
 
Introducing Mobile Cross Promotion Framework
Introducing Mobile Cross Promotion FrameworkIntroducing Mobile Cross Promotion Framework
Introducing Mobile Cross Promotion Framework
 
2011 08-24 mobile web app
2011 08-24  mobile web app2011 08-24  mobile web app
2011 08-24 mobile web app
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 

Similar a Integrate Android Apps and Web Apps

App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)CommonsWare
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and TacticsCommonsWare
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly BeanCommonsWare
 
Testing Strategy for Progressive Web Apps
Testing Strategy for Progressive Web AppsTesting Strategy for Progressive Web Apps
Testing Strategy for Progressive Web AppsPerfecto by Perforce
 
Deep Link (to the Future)
Deep Link (to the Future)Deep Link (to the Future)
Deep Link (to the Future)Akash Gupta
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1Jyothirmayee Pola
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1Jyothirmayee Pola
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile WebCommonsWare
 
Meet.js Summit 2019 - PWA in practice
Meet.js Summit 2019 - PWA in practiceMeet.js Summit 2019 - PWA in practice
Meet.js Summit 2019 - PWA in practiceŁukasz Romanowicz
 
A Guide to Mobile App Development - Web vs Native vs Hybrid.pdf
A Guide to Mobile App Development - Web vs Native vs Hybrid.pdfA Guide to Mobile App Development - Web vs Native vs Hybrid.pdf
A Guide to Mobile App Development - Web vs Native vs Hybrid.pdfWDP Technologies
 
Mobile app development converted
Mobile app development convertedMobile app development converted
Mobile app development convertedSandy Gupta
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWAIdo Green
 
Selenium conf india pwa 2018
Selenium conf india pwa 2018Selenium conf india pwa 2018
Selenium conf india pwa 2018Perfecto Mobile
 
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewAndroid Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewCommonsWare
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Springsdeeg
 
Mobile Apps Performance Testing Using Open Source Tool JMeter
Mobile Apps Performance Testing Using Open Source Tool JMeterMobile Apps Performance Testing Using Open Source Tool JMeter
Mobile Apps Performance Testing Using Open Source Tool JMeterDevendra Singh
 
Online testconf event rwd and pwa 2018
Online testconf event rwd and pwa 2018Online testconf event rwd and pwa 2018
Online testconf event rwd and pwa 2018Perfecto Mobile
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...NITHIN S.S
 

Similar a Integrate Android Apps and Web Apps (20)

App Integration (Revised and Updated)
App Integration (Revised and Updated)App Integration (Revised and Updated)
App Integration (Revised and Updated)
 
App integration: Strategies and Tactics
App integration: Strategies and TacticsApp integration: Strategies and Tactics
App integration: Strategies and Tactics
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
 
Testing Strategy for Progressive Web Apps
Testing Strategy for Progressive Web AppsTesting Strategy for Progressive Web Apps
Testing Strategy for Progressive Web Apps
 
Deep Link (to the Future)
Deep Link (to the Future)Deep Link (to the Future)
Deep Link (to the Future)
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
 
cloudcomputing.pptx
cloudcomputing.pptxcloudcomputing.pptx
cloudcomputing.pptx
 
Meet.js Summit 2019 - PWA in practice
Meet.js Summit 2019 - PWA in practiceMeet.js Summit 2019 - PWA in practice
Meet.js Summit 2019 - PWA in practice
 
A Guide to Mobile App Development - Web vs Native vs Hybrid.pdf
A Guide to Mobile App Development - Web vs Native vs Hybrid.pdfA Guide to Mobile App Development - Web vs Native vs Hybrid.pdf
A Guide to Mobile App Development - Web vs Native vs Hybrid.pdf
 
Mobile app development converted
Mobile app development convertedMobile app development converted
Mobile app development converted
 
Deep linking
Deep linkingDeep linking
Deep linking
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
 
Selenium conf india pwa 2018
Selenium conf india pwa 2018Selenium conf india pwa 2018
Selenium conf india pwa 2018
 
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot ViewAndroid Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
 
Building a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / SpringBuilding a Secure App with Google Polymer and Java / Spring
Building a Secure App with Google Polymer and Java / Spring
 
Mobile Apps Performance Testing Using Open Source Tool JMeter
Mobile Apps Performance Testing Using Open Source Tool JMeterMobile Apps Performance Testing Using Open Source Tool JMeter
Mobile Apps Performance Testing Using Open Source Tool JMeter
 
Online testconf event rwd and pwa 2018
Online testconf event rwd and pwa 2018Online testconf event rwd and pwa 2018
Online testconf event rwd and pwa 2018
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
 

Más de CommonsWare

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsCommonsWare
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting Android Developers for Your Wearables
Getting Android Developers for Your WearablesCommonsWare
 
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable AppsWhen Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable AppsCommonsWare
 
The Action Bar: Front to Back
The Action Bar: Front to BackThe Action Bar: Front to Back
The Action Bar: Front to BackCommonsWare
 
Android Security: Defending Your Users
Android Security: Defending Your UsersAndroid Security: Defending Your Users
Android Security: Defending Your UsersCommonsWare
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerCommonsWare
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail PatternCommonsWare
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful ThreadingCommonsWare
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!CommonsWare
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPagerCommonsWare
 
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2CommonsWare
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of WearablesCommonsWare
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipherCommonsWare
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFCCommonsWare
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsCommonsWare
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld KeynoteCommonsWare
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and BeyondCommonsWare
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsCommonsWare
 
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddCommonsWare
 

Más de CommonsWare (20)

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
 
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable AppsWhen Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
 
The Action Bar: Front to Back
The Action Bar: Front to BackThe Action Bar: Front to Back
The Action Bar: Front to Back
 
Android Security: Defending Your Users
Android Security: Defending Your UsersAndroid Security: Defending Your Users
Android Security: Defending Your Users
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
 
Maps V2... And You!
Maps V2... And You!Maps V2... And You!
Maps V2... And You!
 
A Deep Dive Into ViewPager
A Deep Dive Into ViewPagerA Deep Dive Into ViewPager
A Deep Dive Into ViewPager
 
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
 
X Means Y
X Means YX Means Y
X Means Y
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipher
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFC
 
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business ModelsMaking Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld Keynote
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
 
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... OddAndroid Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
 

Último

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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 Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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 DevelopmentsTrustArc
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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 productivityPrincipled Technologies
 
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.pptxHampshireHUG
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
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 ...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
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
 

Integrate Android Apps and Web Apps

  • 1. Integrating Android Apps and Web Apps Copyright © 2013 CommonsWare, LLC
  • 2. Objective: Add Value ● App complements site, does not replace it – Different roles, different scenarios ● Support multiple screens – Browser on desktop interacting with app on device ● Single source – App and site leverage same Web service back end Copyright © 2013 CommonsWare, LLC
  • 3. Launching App from Web ● Objective – User clicks on link in Web site from mobile browser – App pops up in response to that click ● Examples – Wikipedia – Barcode scanning Copyright © 2013 CommonsWare, LLC
  • 4. Launching App from Web ● Strategy #1: Regular URL – Site has link to: http://www.yourdomain.com/something – What App Has ● Activity to be displayed when that link is clicked ● <intent-filter> advertising supporting VIEW action, BROWSABLE category, and that URL Copyright © 2013 CommonsWare, LLC
  • 5. Launching App from Web ● Strategy #1: Regular URL – What User Sees ● If app not installed: whatever is at that URL ● If app is installed: chooser to use browser or app to process the request (unless default already chosen) – Passing Data ● Additional path segments (with pathPrefix) ● Query parameters Copyright © 2013 CommonsWare, LLC
  • 6. Launching App from Web ● Strategy #1: Regular URL – Limitation: Chooser appears ● User can make your app be the default for this particular request, but still sees chooser the first time ● No way to avoid allowing a Web browser to handle an HTTP link Copyright © 2013 CommonsWare, LLC
  • 7. Launching App from Web ● Strategy #2: Custom Scheme – Site has link to: yourscheme://something – What App Has ● Activity to be displayed when that link is clicked ● <intent-filter> advertising supporting VIEW action, BROWSABLE category, and that URL complete with custom scheme Copyright © 2013 CommonsWare, LLC
  • 8. Launching App from Web ● Strategy #2: Custom Scheme – Pros ● No chooser! ● Alignment with other operating systems – Cons ● Link is useless without app ● Possible scheme collision Copyright © 2013 CommonsWare, LLC
  • 9. Launching App from Web ● Strategy #3: Custom MIME Type – Site serves up content under distinct vendor MIME type, that your app handles – Cons ● Effects not immediate: download first, tap on notification, then get into your app ● Possible MIME type collisions ● Overall Con: Assumes Browsing from the Device Copyright © 2013 CommonsWare, LLC
  • 10. Launching App from Desktop Web ● Strategy #1: QR Codes – App displays QR code, user scans – Requires QR code-scanning app ● Barcode Scanner ● Google Goggles ● Etc. Copyright © 2013 CommonsWare, LLC
  • 11. Launching App from Desktop Web ● Strategy #2: Push with GCM – Google Cloud Messaging – Push messages from your server to the device ● In response to actions within your Web app ● In response to other conditions (e.g., reminders) – Free! – Requires Android 2.2+, routing data through Google servers Copyright © 2013 CommonsWare, LLC
  • 12. Launching App from Desktop Web ● Strategy #2: Push with GCM – Client Side Steps ● Get an API key ● Add GCM JAR to your libs/ directory ● Add permissions ● Register a GCM-supplied BroadcastReceiver ● Implement an IntentService that handles events ● Register the app when run ● Send registration ID to your server Copyright © 2013 CommonsWare, LLC
  • 13. Launching App from Desktop Web ● Strategy #2: Push with GCM – Server Side Steps ● Find GCM server library ● Create JSON of payload and other options ● Send notification with payload and registration IDs Copyright © 2013 CommonsWare, LLC
  • 14. Getting to Web from App ● Option #1: ACTION_VIEW – Create an ACTION_VIEW Intent, with the URL you wish to visit – Pass that to startActivity() – Result: default/chosen browser launched Copyright © 2013 CommonsWare, LLC
  • 15. Getting to Web from App ● Option #2: WebView – Embed WebView widget in layout, used by activity or fragment ● WebViewFragment available for API Level 11 fragments – Configure WebView ● e.g., JavaScript disabled by default – Call loadUrl() with your URL – Result: your Web site in your app Copyright © 2013 CommonsWare, LLC
  • 16. Fancier Stuff ● Common Web Service – App plus “single page application” or equivalent – Works best with REST-style APIs (vs. SOAP, XML- RPC, etc.) ● OAuth – Common authentication infrastructure for app, Web site – App side tends to be a bit clunky Copyright © 2013 CommonsWare, LLC
  • 17. Fancier Stuff ● Common Implementation – Use same Web technologies on device as on desktop – HTML5 app, PhoneGap, etc. ● “Throwing” Between Screens – Capture current session state, package up in way that other environment can continue Copyright © 2013 CommonsWare, LLC
  • 18. Speaker Contact Information SlideShare Copyright © 2013 CommonsWare, LLC