Regardless of publishability, is it possible write an android Java application that at some point, while running, overwrites itself with some other random code and restarts itself? Does it remain an executable application after the change? Where can I look for resources on how to do this?
Clarifying, let's suppose I have a brand new Foo app, and somewhere in there I have a method,
// yes I know, it's just an example
public static int getOne(){
return 1;
}
And at some point in the execution of the application, I want it to change getOne() to now do
// again, not the most useful example, but an example nonetheless
public static double getOne(){
return OtherModule.getTwo();
}
And then somehow rebuild the app, live, so that everything just uses this new method?
Thanks!