开发者

Port Android App to Desktop? [closed]

开发者 https://www.devze.com 2022-12-28 17:32 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. 开发者_如何学C Want to improve this question? Update the question so it can be answered with facts and citatio
Closed. This question is opinion-based. It is not currently accepting answers.
开发者_如何学C

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed last year.

Improve this question

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?


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.


Consider changing your code to use libGDX - http://libgdx.badlogicgames.com/. You can maintain the same codebase and deploy simultaneously to Android and the Desktop (Windows, Linux, Mac). You will however need to convert your UI system to an OpenGL based UI. libGDX itself has a nice UI system which you can use. If not for this app, you can use it for future ones.

0

精彩评论

暂无评论...
验证码 换一张
取 消