Create an additional system

Many applications on the Android market offer free add-ons, such as the paid version and after installation, they simply add functionality, but are not in the installed programs and are not in the process. Question: how to implement just such a system add-in yourself .apk, something to unlock the application, but it was not installed on the device (in many cases, download content for playback anyway).

+4
source share
1 answer

There are several ways to do this. Essentially, you can fill out all of your code in the main apk, and then the add-on packages will tell you what you can access. Or you can make apks addons have the actual logic in them. Or a combination of both.

Here is what you can do for starters:

  • Create a shared ContentProvider . Mostly shared content between 2 apks. You can also register 2 apks to run in the same process and grant privilege to the apks content provider in the same process or signature .
  • Define actions and other components available only on the apk addon. The main apk will need to determine if the component is callable. You can use the PackageManager request methods to do this.
+1
source

Source: https://habr.com/ru/post/1343304/


All Articles