What I want to do is maybe hard to explain or to understand so I made a quick drawing.
First of all, we have 2 Android apps. A display "Hello World" and B has a button which (maybe) can download an app (on web or local).
When we click on B button, that download A app, and install it (like if you download it with any market) and then, use A app to modify B app.
I don't know if it's even possible :
- To download app and install it programmatically
- Create a "polymorph" Android app like that.
If I have to sum up what I want with one sentence it would be :
Modify B application with A app which B just downloaded and installed.
I'm then sure you can download those SDK (apparently as APK here) and use
Fragment
s or any code to inject or something.Probably will need to use reflection though, because you main application "B" won't resolve the classes that are in "A".
Maybe your "A" modules should expose the methods / variables / fragments it has, like in an embedded JSON descriptive asset or something, that "B" could parse and know what to do with.
The point here is obviously to move all the "A" code away from "B", meaning flexibility for "B".