Programming inside an application in Android?

Hello all!
I was wondering whether it is possible to actually implement new lines of code within a running programme.

For instance, summoning a panel and entering a line of code that modifies the color of a background inside an application, or do you have to sort of “fake” the programming by creating conditions inside the application saying for instance “if the user types XXX (the code in question) execute XXX” therefore making it look like programming but basically anticipating a certain number of possible responses by the user.

Thanks for your help! :wink:

EDIT: darn, perhaps I should have posted this in the Java mobile development… but it’s a general question for Java programming anyways!

The JVM supports hotswapping of methods for running programs. For example, in Eclipse if you run your program in debug mode then when you change a methods code you will see the change in the program the next time the method is called. Not everything can be hotswapped, I know you can’t add or remove methods or modify global variables. I’m also not sure if this can be done on Android as I’ve not developed for it.

Android does not support code hotswapping.

I mean if you are clever you are using something like libgdx so it runs on desktop anyway and you can hotswap code with debug eclipse for example

and later try on android… I only upload to android very rarely

I upload it only when reached huge changes, or it is something non testable on desktop like swipe sensitivity, pinching, or android related stuff.

I take desktop version as my android emulator, which is a truly emulator, doesn’t waste my 20m just to boot up.