Question

Is it possible to load activities from an external dex-file? I'm thinking of some plug-in style-architecture, where an application can be extended by downloading dex-files with activities and classes containing extra functionality.

I've managed to load and invoke methods on a class from a downloaded dex-file using DexClassLoader and reflection. But could I somehow use this technique to download and present an Activity? Is it possible to register this new Activity programmatically so that I can invoke it using an Intent?

I know that it's possible (and the recommended way is) to install the other Activity through the normal procedure with an APK, and then load it from my main activity using Intents or simply update the installed application, but I want to extend my already installed application by downloading some extra classes and execute everything in the same VM, same sandbox.

Hm, let me know if you don't understand what I mean, cause this got a bit messy.. :)

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top