Plugins

Services

Manifest can declare icons and description — android:icon=”@/drawable/XXXX”
always set android:exported=”true”
permissions are possible
Plugins could also be Activities
Also service could launch activity
IntentSerivce is Asynchronous

Metadata

use self documenting names like OptionalCopyright
get metadata with getPackageManager() with GET_META_DATA flag

Plugin UUID

Should use

Plugin Registration

Store information in content provider

Content Provider

Stores meta data from plugins read from manifest
Faster than reading manifest directly
Get plugin assets from the assets manager store pointers in the provider
Contract Pattern in android.provider class is helpful

Contract Classes

Should be in a library so developers can use in their projects

Intents

Can have multiple categories as Intent Filters
Data must be URI
Use parcelable extra to send more data
Use MIME types, start with vnd
choose startService() vs startActivity()

Ibinder

used for callback to main app
IPC Service
can access shared preferences with MODE_MULTI_PROCCESS flag and explicit name

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *