Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (289)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Programming inside an application in Android?  (Read 367 times)
0 Members and 1 Guest are viewing this topic.
Offline Marma

JGO Visitor




« Posted 2013-03-06 22:58:01 »

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!
Offline Z-Man

Senior Member


Medals: 8



« Reply #1 - Posted 2013-03-07 00:10:20 »

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.
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #2 - Posted 2013-03-07 01:13:34 »

Android does not support code hotswapping.

Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Offline Cero
« Reply #3 - Posted 2013-03-07 02:16:54 »

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

Online ReBirth
« Reply #4 - Posted 2013-03-07 02:41:21 »

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.

Pages: [1]
  ignore  |  Print  
 
 

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (60 views)
2013-05-17 21:29:12

alaslipknot (69 views)
2013-05-16 21:24:48

gouessej (99 views)
2013-05-16 00:53:38

gouessej (96 views)
2013-05-16 00:17:58

theagentd (107 views)
2013-05-15 15:01:13

theagentd (98 views)
2013-05-15 15:00:54

StreetDoggy (144 views)
2013-05-14 15:56:26

kutucuk (167 views)
2013-05-12 17:10:36

kutucuk (166 views)
2013-05-12 15:36:09

UnluckyDevil (175 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.089 seconds with 21 queries.