How to develop an application with add-ons?

Is there a circuit or primer for how you developed the application with add-ons?

For example, how to develop some kind of structure for adding β€œthemes” to the application?

There is a main application with two themes. The user should be able to download another application for a specific topic.

How does the original application and the new downloaded application work?

How would you develop an original application to get information about a theme and graphic resources from a second application only for a theme?

I understand that applications are completely separate, so I don’t understand how to do this.

+8
android
source share
2 answers

How to combine the original application and the new downloaded application?

For the topic, who says they need to talk together?

How would you develop an original application to get information about a theme and graphic objects from an application for the 2nd theme only?

Step # 1: Choose a naming convention for your packages. For example, if your core application is com.abc.app , your themes might be com.abc.app.theme.* .

Step # 2: When the user comes to the topic selection, use PackageManager and getInstalledApplications() to find their themes by checking the names of their packages.

Step # 3: When it's time to use the theme, call getResourcesForApplication() on the PackageManager to get the Resources theme application so you can access your content.

I am sure that there are strategies (for example, a topic is basically a pipeline, deploying its material in a directory on an external storage from which your main application reads information), but this is the one I started with, since it requires minimal user intervention .

+6
source share

I believe that the cleanest design in this case should consist of one application on the market and have themes on your own server. Then the user can download the application only once from the Market, and then apply the themes available on your server.

However, if you prefer to use them as separate entries in the Market, you can set the android: sharedUserId flag in the manifest so that they all run under the same user ID, which allows you to exchange files (bitmap images, etc.). ) between them. Remember that all of them must be signed with the same certificate.

What may confuse the user is that they will be able to download the add-in before downloading the main application ... in this case, you will need to display an error message asking you to download the main application.

0
source share

All Articles