SlideShare a Scribd company logo
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

More Related Content

What's hot

Progressive web app
Progressive web appProgressive web app
Progressive web app
Deepak Upadhyay
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Allison Clemens
 
Connfa! Progressive web app
Connfa! Progressive web appConnfa! Progressive web app
Connfa! Progressive web app
Lemberg Solutions
 
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
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
NexThoughts Technologies
 
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
Sai Kiran Kasireddy
 
Pwa demystified
Pwa demystifiedPwa demystified
Pwa demystified
edynamic
 
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 perspective
Andreas Bovens
 
Cinebody 2.2 Update
Cinebody 2.2 UpdateCinebody 2.2 Update
Cinebody 2.2 Update
Travis Page
 
Joomla page end social share
Joomla page end social shareJoomla page end social share
Joomla page end social share
Webkul Software Pvt. Ltd.
 
PWA - Progressive Web App
PWA - Progressive Web AppPWA - Progressive Web App
PWA - Progressive Web App
Robert Robinson
 
Getting Started with Progressive Web Apps
Getting Started with Progressive Web AppsGetting Started with Progressive Web Apps
Getting Started with Progressive Web Apps
Bill Stavroulakis
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Saikiran Sheshagiri
 
Progressive Web Apps 101
Progressive Web Apps 101Progressive Web Apps 101
Progressive Web Apps 101
Daniel 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 Camp09
Sudha 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 2016
Abdelrahman Omran
 
Introducing Mobile Cross Promotion Framework
Introducing Mobile Cross Promotion FrameworkIntroducing Mobile Cross Promotion Framework
Introducing Mobile Cross Promotion Framework
Xin Hu
 
2011 08-24 mobile web app
2011 08-24  mobile web app2011 08-24  mobile web app
2011 08-24 mobile web app
Sholto Maud
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
Jana Moudrá
 

What's hot (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 to 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 Tactics
CommonsWare
 
What's New in Jelly Bean
What's New in Jelly BeanWhat's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
 
Testing Strategy for Progressive Web Apps
Testing Strategy for Progressive Web AppsTesting Strategy for Progressive Web Apps
Testing Strategy for Progressive Web Apps
Perfecto 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 session1
Jyothirmayee Pola
 
Performance testing – mobile apps session1
Performance testing – mobile apps   session1Performance testing – mobile apps   session1
Performance testing – mobile apps session1
Jyothirmayee Pola
 
From Android to the Mobile Web
From Android to the Mobile WebFrom Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
 
cloudcomputing.pptx
cloudcomputing.pptxcloudcomputing.pptx
cloudcomputing.pptx
multicreationofficia
 
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.pdf
WDP Technologies
 
Mobile app development converted
Mobile app development convertedMobile app development converted
Mobile app development converted
Sandy Gupta
 
Deep linking
Deep linkingDeep linking
Deep linking
Ramu Chokkalingam
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
Ido Green
 
Selenium conf india pwa 2018
Selenium conf india pwa 2018Selenium conf india pwa 2018
Selenium conf india pwa 2018
Perfecto 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 View
CommonsWare
 
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
sdeeg
 
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
Devendra Singh
 
Web vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdf
Web vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdfWeb vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdf
Web vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdf
ShanSmith11
 
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
Perfecto Mobile
 

Similar to 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
 
Web vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdf
Web vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdfWeb vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdf
Web vs. Mobile Apps Complete Guide, Pros, Cons & Key Insights.pdf
 
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
 

More from CommonsWare

Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable ProjectsGradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
 
Getting Android Developers for Your Wearables
Getting Android Developers for Your WearablesGetting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
 
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
CommonsWare
 
The Action Bar: Front to Back
The Action Bar: Front to BackThe Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
 
Android Security: Defending Your Users
Android Security: Defending Your UsersAndroid Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
CommonsWare
 
Mastering the Master Detail Pattern
Mastering the Master Detail PatternMastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
 
Not Quite As Painful Threading
Not Quite As Painful ThreadingNot Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
 
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 ViewPager
CommonsWare
 
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
CommonsWare
 
X Means Y
X Means YX Means Y
X Means Y
CommonsWare
 
The Wonderful World of Wearables
The Wonderful World of WearablesThe Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
 
Securing User Data with SQLCipher
Securing User Data with SQLCipherSecuring User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
 
Beaming Data to Devices with NFC
Beaming Data to Devices with NFCBeaming Data to Devices with NFC
Beaming Data to Devices with NFC
CommonsWare
 
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
CommonsWare
 
AppsWorld Keynote
AppsWorld KeynoteAppsWorld Keynote
AppsWorld Keynote
CommonsWare
 
Rich Text Editing and Beyond
Rich Text Editing and BeyondRich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
 
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and TacticsBackwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
CommonsWare
 
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
CommonsWare
 

More from 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
 

Recently uploaded

Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 

Recently uploaded (20)

Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 

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