Intent + Service + Content Provider = Plugin Architecture

A session at AnDevCon Boston 2013

Friday 31st May, 2013

3:30pm to 4:45pm (EST)

Android developers often lament the inability for Android to natively discover and launch application extensions via plug-ins. 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 plug-in architectures: Intents, Services and Content Providers. The Content Provider fulfills the role of the plug-in registrar. Services, even when deployed in separate applications, represent the plug-ins 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 plug-in registrar. Techniques for declaratively classifying different types of plug-ins (services) and dynamically registering new plug-ins 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!


Time 3:30pm4:45pm EST

Date Fri 31st May 2013

Short URL


Official event site


View the schedule


See something wrong?

Report an issue with this session