Enviar pesquisa
Carregar
App Integration (Revised and Updated)
•
1 gostou
•
734 visualizações
C
CommonsWare
Seguir
Presentation for NYC and Philadelphia-area Android developer meetups, September 2012
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 30
Baixar agora
Baixar para ler offline
Recomendados
App integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
Rich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
Android Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
How to enhance Email with Embedded Experiences
How to enhance Email with Embedded Experiences
IBM Connections Developers
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
Arun Gupta
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
Graeme_IBM
Magnolia CMS on Jelastic
Magnolia CMS on Jelastic
Edgar Vonk
Recomendados
App integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
Rich Text Editing and Beyond
Rich Text Editing and Beyond
CommonsWare
Android Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
How to enhance Email with Embedded Experiences
How to enhance Email with Embedded Experiences
IBM Connections Developers
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
Arun Gupta
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
Graeme_IBM
Magnolia CMS on Jelastic
Magnolia CMS on Jelastic
Edgar Vonk
Magnolia CMS 5.0 - Overview
Magnolia CMS 5.0 - Overview
Philipp Bärfuss
Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - Architecture
Philipp Bärfuss
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch
Nadeus Education Services session on Google Apps and Google App Engine
Nadeus Education Services session on Google Apps and Google App Engine
Nadeus Education Services
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Ciklum Ukraine
2013 04-02-server-side-backbone
2013 04-02-server-side-backbone
SC5.io
Embedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse application
Boris Bokowski
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Ryan Baxter
Flutter vs ReactNative
Flutter vs ReactNative
Sumit Sahoo
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
CommonsWare
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
CommonsWare
From Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
Securing User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
What's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
X Means Y
X Means Y
CommonsWare
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
CommonsWare
Open source Cloud Automation Platform
Open source Cloud Automation Platform
Kishore Neelamegam
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyer
mfrancis
Appium solution artizone
Appium solution artizone
Nael Abd Eljawad
IBM Datapower Gateways - Devops with UrbanCode Deploy
IBM Datapower Gateways - Devops with UrbanCode Deploy
Jared Putman
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM Domino
Serdar Basegmez
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
CommonsWare
Mais conteúdo relacionado
Mais procurados
Magnolia CMS 5.0 - Overview
Magnolia CMS 5.0 - Overview
Philipp Bärfuss
Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - Architecture
Philipp Bärfuss
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch
Nadeus Education Services session on Google Apps and Google App Engine
Nadeus Education Services session on Google Apps and Google App Engine
Nadeus Education Services
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Ciklum Ukraine
2013 04-02-server-side-backbone
2013 04-02-server-side-backbone
SC5.io
Embedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse application
Boris Bokowski
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Ryan Baxter
Flutter vs ReactNative
Flutter vs ReactNative
Sumit Sahoo
Mais procurados
(9)
Magnolia CMS 5.0 - Overview
Magnolia CMS 5.0 - Overview
Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - Architecture
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
soft-shake.ch - Windows Phone 7 „Mango“ – what’s new for Developers?
Nadeus Education Services session on Google Apps and Google App Engine
Nadeus Education Services session on Google Apps and Google App Engine
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
2013 04-02-server-side-backbone
2013 04-02-server-side-backbone
Embedding Web UIs in your Eclipse application
Embedding Web UIs in your Eclipse application
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Flutter vs ReactNative
Flutter vs ReactNative
Semelhante a App Integration (Revised and Updated)
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
CommonsWare
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
CommonsWare
From Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
Securing User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
What's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
X Means Y
X Means Y
CommonsWare
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
CommonsWare
Open source Cloud Automation Platform
Open source Cloud Automation Platform
Kishore Neelamegam
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyer
mfrancis
Appium solution artizone
Appium solution artizone
Nael Abd Eljawad
IBM Datapower Gateways - Devops with UrbanCode Deploy
IBM Datapower Gateways - Devops with UrbanCode Deploy
Jared Putman
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM Domino
Serdar Basegmez
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
CommonsWare
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych
Fwdays
Introduction to android - SpringPeople
Introduction to android - SpringPeople
SpringPeople
Appium
Appium
Keshav Kashyap
Android workshop material
Android workshop material
Reza Yogaswara
Delegating user tasks in applications
Delegating user tasks in applications
Friedger Müffke
JNUC 2017: Open Distribution Server
JNUC 2017: Open Distribution Server
Bryson Tyrrell
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JSFestUA
Semelhante a App Integration (Revised and Updated)
(20)
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
From Android to the Mobile Web
From Android to the Mobile Web
Securing User Data with SQLCipher
Securing User Data with SQLCipher
What's New in Jelly Bean
What's New in Jelly Bean
X Means Y
X Means Y
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
Open source Cloud Automation Platform
Open source Cloud Automation Platform
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyer
Appium solution artizone
Appium solution artizone
IBM Datapower Gateways - Devops with UrbanCode Deploy
IBM Datapower Gateways - Devops with UrbanCode Deploy
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM Domino
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
"Micro-frontends, web development", Oleksandr Khivrych
"Micro-frontends, web development", Oleksandr Khivrych
Introduction to android - SpringPeople
Introduction to android - SpringPeople
Appium
Appium
Android workshop material
Android workshop material
Delegating user tasks in applications
Delegating user tasks in applications
JNUC 2017: Open Distribution Server
JNUC 2017: Open Distribution Server
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
Mais de CommonsWare
Getting 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 Apps
CommonsWare
The Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
CommonsWare
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
Not Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
Maps V2... And You!
Maps V2... And You!
CommonsWare
A Deep Dive Into ViewPager
A Deep Dive Into ViewPager
CommonsWare
The Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
Beaming 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 Models
CommonsWare
AppsWorld Keynote
AppsWorld Keynote
CommonsWare
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
CommonsWare
Google TV For Fun
Google TV For Fun
CommonsWare
If I Were Starting Now
If I Were Starting Now
CommonsWare
Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)
CommonsWare
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
CommonsWare
Android Library Projects
Android Library Projects
CommonsWare
Mais de CommonsWare
(18)
Getting 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 Apps
The Action Bar: Front to Back
The Action Bar: Front to Back
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
Not Quite As Painful Threading
Not Quite As Painful Threading
Maps V2... And You!
Maps V2... And You!
A Deep Dive Into ViewPager
A Deep Dive Into ViewPager
The Wonderful World of Wearables
The Wonderful World of Wearables
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
AppsWorld Keynote
AppsWorld Keynote
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
Google TV For Fun
Google TV For Fun
If I Were Starting Now
If I Were Starting Now
Tuning Android Applications (Part Deux)
Tuning Android Applications (Part Deux)
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
Android Library Projects
Android Library Projects
Último
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Orbitshub
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
johnbeverley2021
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Deepika Singh
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Bhuvaneswari Subramani
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
Sandro Moreira
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Angeliki Cooney
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Zilliz
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
MadyBayot
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
Zilliz
Último
(20)
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Elevate Developer Efficiency & build GenAI Application with Amazon Q
Elevate Developer Efficiency & build GenAI Application with Amazon Q
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
App Integration (Revised and Updated)
1.
App Integration: Strategies
and Tactics Copyright © 2012CommonsWare, LLC
2.
Objective: Add Value ●
Add Value for Users – More functionality without as much development effort ● Add Value for Third Parties – Their apps are more valuable when you help drive their adoption ● Add Value for You – Reciprocity from third parties Copyright © 2012CommonsWare, LLC
3.
Integration Models ●
Peers – Apps with value independent of yours – Hard or soft dependencies ● Plugins – Apps with no value independent of yours Copyright © 2012CommonsWare, LLC
4.
Difficulty Level: One
Red Bull Copyright © 2012CommonsWare, LLC
5.
Activities, Implicit Intents ●
Make a Generic Request – ACTION_VIEW, ACTION_SEND, etc. ● User Dictates Terms – What applications are installed that could handle it – What application to use for this particular request – What to do with that application Copyright © 2012CommonsWare, LLC
6.
Activities, Implicit Intents ●
Making the Selection – No options? Crash! – One option? Automatic start, no intervention – Multiple options? ● Default chooser ● Override chooser (Intent.createChooser()) ● ShareActionProvider ● Apple patent workarounds ● DIY Copyright © 2012CommonsWare, LLC
7.
Activities, Implicit Intents ●
DIY – PackageManager queryIntentActivities() returns list of possibilities, given an Intent – You render resulting List somehow ● Avoiding the No-Options Crash – Same technique: if list empty, startActivity() would fail Copyright © 2012CommonsWare, LLC
8.
Activities, Explicit Intents ●
Hard Dependency, Declared in Code – Craft Intent that will only be handled by peer application – Use PackageManager queryIntentActivities() to confirm it exists (or handle the exception) – Use with startActivity() / startActivityForResult() Copyright © 2012CommonsWare, LLC
9.
UI Integration via
Web ● No Activity? How About a Web Site? – Easy: launch browser on URL with ACTION_VIEW – More Interesting: Host a WebView ● Pre-fill in forms using loadUrl(“javascript:...”) ● Warning #1: May be tough to control ● Warning #2: Dependencies on non-public “APIs” Copyright © 2012CommonsWare, LLC
10.
Difficulty Level: Two
Red Bulls Copyright © 2012CommonsWare, LLC
11.
UI Integration via
Web ● Reverse Integration: Web to App – Key: BROWSABLE category – Option #1: <data> For Your URL ● Option to launch app if app installed, else URL directs to Web page to go download the app – Option #2: Something Specific ● Intent.toUri() to generate a URL ● Custom scheme Copyright © 2012CommonsWare, LLC
12.
Integrating Resources ●
createPackageContext() – Returns a Context that will resolve resources from some other package – Example Use: theme packs ● APK (possibly paid app) with res0urces representing theme ● Detect existence using PackageManager ● Use createPackageContext() to retrieve resources and apply to your UI Copyright © 2012CommonsWare, LLC
13.
Integration by ContentProvider ●
All You Need is a Uri – And some idea of what the schema is, so you know what to do with it ● Example: plugins implementing a standard schema that you require – Getting the Uri ● Well-known resource name ● Bootstrap API (e.g., broadcast, remote service) Copyright © 2012CommonsWare, LLC
14.
Integration by ContentProvider ●
The Permission Proxy – Problem: Your app needs too many permissions ● Example: Calendar integration – Solution ● Wrap OS/third-party ContentProvider in one of yours, with same schema ● Put that ContentProvider in plugin, to isolate permission ● Check signature to ensure only used by you Copyright © 2012CommonsWare, LLC
15.
Integration by Service ●
Command Pattern – Third Party Supplies Intent Structure ● Action string ● Available extras – Call startService() as Needed ● Directly ● Via PendingIntent (e.g., AlarmManager) Copyright © 2012CommonsWare, LLC
16.
Integration by Service ●
Binding Pattern – Agreed-Upon AIDL ● Peer: first mover ● Plugin: host defines – Third Party Implements AIDL Binder – You Bind and Use Copyright © 2012CommonsWare, LLC
17.
Integration by Broadcast ●
Agreed-Upon Action, Ordered vs. Regular – Peer: first mover – Plugin: host defines ● One Side Broadcast, Other Side Receives – Manifest-registered receiver – registerReceiver() Copyright © 2012CommonsWare, LLC
18.
Difficulty Level: Case of
Red Bulls Copyright © 2012CommonsWare, LLC
19.
UI Integration via
RemoteViews ● Two Apps' UIs Simultaneously ● RemoteViews Host – Get RemoteViews from third-party ● Broadcast? Remote service? ● Initially, plus changes over time – apply() RemoteViews into your desired container Copyright © 2012CommonsWare, LLC
20.
UI Integration via
RemoteViews ● Limitations – Widgets, methods available in RemoteViews – No direct interaction between apps ● Solution: API accessed via PendingIntents Copyright © 2012CommonsWare, LLC
21.
Difficulty Level: Red Bull
Bottling Plant Copyright © 2012CommonsWare, LLC
22.
UI Integration via
Parcelable ● RemoteViews Got You Down? Roll Your Own! – RemoteViews is a data structure representing commands to build a UI – Alternative: DIY RemoteViewsEx – Limitations ● Still loosely coupled for events (PendingIntent, Messenger, etc.) ● Effort proportional to the complexity of the UI you wish to share Copyright © 2012CommonsWare, LLC
23.
Integrating Code ●
Option #1: createPackageContext() – getClassLoader() will return ClassLoader for accessing classes in other APK ● Use CONTEXT_INCLUDE_CODE in createPackageContext() call – Use reflection from there (e.g., loadClass()) to access foreign code Copyright © 2012CommonsWare, LLC
24.
Integrating Code ●
Option #2: DexClassLoader – Given JAR/APK containing dex'd bytecode, allows you to load classes just like a regular ClassLoader ● Up to you to get the JAR or APK file Copyright © 2012CommonsWare, LLC
25.
Integrating Code ●
WARNING – You might not know where that code came from ● Code injection attacks – Executed code runs with your permissions ● May do things you rather wish they would not – Net: very risky technique Copyright © 2012CommonsWare, LLC
26.
And Now, The Rest
of the Story Copyright © 2012CommonsWare, LLC
27.
Discovery Mechanisms ●
Hard-Coded ● Discovery via Broadcast – Host sends a broadcast periodically (first run, package installed, package removed) – Peers/plugins reply with broadcast about capabilities – Related: ACTION_PACKAGE_ADDED Copyright © 2012CommonsWare, LLC
28.
Discovery Mechanisms ●
Discovery via Naming Convention – Plugins go in com.myfirm.myapp.plugin.* – Host uses PackageManager to identify – Further Handshaking ● Well-known resource ● Well-known “narrowcast” via setPackage() Copyright © 2012CommonsWare, LLC
29.
More Stuff to
Consider ● Custom Permissions – Users should get a vote on data sharing ● Integration Library – JAR to ease third-parties working with your host ● Documentation – Only way anyone will know what to do ● ...and what you would rather they not do Copyright © 2012CommonsWare, LLC
30.
What the Ecosystem
Needs ● Standards – Community-driven implicit Intent actions ● Scaffolding – Library projects, templates for creating these structures ● End-User Discovery – How do they know what can integrate? Copyright © 2012CommonsWare, LLC
Baixar agora