•  

Intent + Service + Content Provider = Plugin Architecture

A session at AnDevCon IV

Thursday 6th December, 2012

8:30am to 9:45am (PST)

Android developers often lament the ability for Android to natively discover and launch application extensions via plugins. The native Java ServiceLoader class is now included in the Android SDK, but it isn’t nearly as effective as it is under Java Standard Edition. Java class-loader solutions often introduce more problems than they solve, and in practice Android’s class-loader separation ensures that object instances created in one Activity or Service aren’t visible inside of another Activity or Service. All is not lost, however.

Android provides all the requisite pieces for truly powerful plugin architectures: Intents, Services and Content Providers. The Content Provider fulfills the role of the plugin registrar. Services, even when deployed in separate applications, represent the plugins available for discovery. Finally, the Intents provide the inter-process communication mechanism that lets all of these disparate pieces work together.

You will leave the class with an understanding and sample code that demonstrates how to create a simple Content Provider implementation that serves as a plugin registrar. Techniques for declaratively classifying different types of plugins (services) and dynamically registering new plugins will also be covered in-depth. Application and service metadata discovery using the Android PackageManager class will also be covered. The class will wrap up with a mini-primer on the Android IBinder interface specifically in the context of cross-process method invocations.

You are encouraged to have a primitive understanding of how Android Intents are used. No prior experience with either Services or Content Providers is assumed.

About the speaker

This person is speaking at this event.
Jason Weiss

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 8:30am9:45am PST

Date Thu 6th December 2012

Short URL

lanyrd.com/sctbcy

Official event site

www.andevcon.com/AnDevCon_IV

View the schedule

Share

See something wrong?

Report an issue with this session