android - ContentProvider vs. using AIDL/Messenger -


i want develop application supports plugins , provides data these plugins. seems me correct way implement plugin-archtitecture on android 1 apk main app , 1 apk per plugin.

but main app , every plugin in different apks can't pass (data) objects 1 other, applications run in different processes , if run in 1 process (which can achieved) have different classloaders , doesn't work. see 2 promising approaches getting data main app plugins:

  1. declaring main app contentprovider. seems me intended approach because want achieve: providing content/data process.
  2. making data objects parcelable , pushing them around aidl or - if not need multithreading - messenger-approach. in opinion, approach seems easier because can use orm-library cares database in background. never used contentproviders before @ first @ thought using contentprovider bit building sql-queries hand (please tell me if i'm wrong), , avoid work!

now know if missed pros or cons , if there notable performance differences between these 2 approaches. , solution prefer , why so?

thanks in advance! replies appreciated!

content provider way share data (that stored in different ways [database, files , on]) between applications. if want share data between application best way this.

however, if want services perform tasks data (for instance, sum several values provided you) it's better have remote service.

in general case, application - plugin interaction more similar remote service. in case main application exposes remote service (an api of application) can used plugins perform actions.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -