Is there an outline or primer of how you would develop an app that has “add-ons”?
E.g., how to develop some sort of framework for adding “themes” to an app?
There is the basic app with 2 themes. The user should be able to download another app for a certain theme.
How does the original app and the new downloaded app talk together?
How would you develop the original app to get the theme information and graphic assets from the 2nd theme only app?
My understanding is that apps are completely separate so this is why I am unclear how to accomplish this.
For a theme, who says they have to talk together?
Step #1: Pick a naming convention for your packages. For example, if your base app is
com.abc.app, your themes could becom.abc.app.theme.*.Step #2: When it comes time for the user to pick a theme, use
PackageManagerandgetInstalledApplications()to find your themes by checking their package names.Step #3: When it comes time to use a theme, call
getResourcesForApplication()onPackageManagerto get the theme application’sResources, so you can get at your stuff.I am sure that there are strategies (e.g., the theme is mostly a conveyor, deploying its stuff in a directory on external storage, from which your main app reads the information), but this is the one I’d start with, as it should require the least user intervention.