tags:

views:

79

answers:

1

I'm just wondering if it would be possible (and legal) to port an Android app to desktop? I'm creating an android game that would work well on PC too (even with the cellphone like layout) and was thinking that maybe I could 'embed' an android emulator with an installer or would that process be a bit hard for a novice Java coder?

A: 

If you keep the application logic separate from Android contructs (activites, intents etc) it should be easy to create Java Swing UI for the desktop app and thus have a common codebase. I have written Java code that is platform agnostic that works on J2ME/BlackBerry/Android and with a bit of design it is not at all hard to do so.

omermuhammed
Well I have both openGL and android UI components in my game.I guess I could just use jogl in replace for android opengl lib (not sure how similar they are) but doing all that just makes me wonder if it wouldn't be 'easier'/smarter to recreate the whole app for desktop.
CodeJustin.com
For me this kind of system worked well when I have multiple applications to create. I agree, for one off case it may be a better idea to just recreate the whole app for desktop.
omermuhammed