I am developing a library for Android that requires frequent updates from a central server. I was thinking how nice it would be if my library could update itself -- or if I
Indeed what you want is supported and works. DexClassLoader is not working as expected for me, but the following code works fine.
DexFile df = new DexFile(new File("/data/app/my_downloaded_lib.apk"));
ClassLoader cl = getClassLoader();
Class clazz = df.loadClass("com/my/lib/MyClass", cl);
About the market question, i don't see any issue with this, but you have to read the EULA to be sure.