How to create an Android library plugin system that updates parent package's app permissions?

53 views Asked by At

I would like to create a plugin system for my Android project, so that you can plug in different modules as needed.

The thing is: Some modules require app permissions, so the AndroidManifest.xml also needs to change based on what module you import.

For example, importing a location related module will require <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> inside the manifest, etc.

Is there a way to express this inside each module so that the parent project doesn't have to know about these additional permissions and everything about the library module is self-contained within the library?

0

There are 0 answers