Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to convert an android app in a desktop app?

I have developed an android app that works great and i would like to migrate it to the desktop is ther any tools or easy way of doing this? If not could you at least give me a solution of running the android app on the desktop(someting similar to the simulator but stand alone aplication without the android os interface).

like image 849
Radu Avatar asked May 24 '12 11:05

Radu


1 Answers

As mentioned, Bluestacks has gotten some good press for being a do nothing option to get an Android application running on Windows.

However, I don't think you are going to be able to find a tool that will be able to port for you. There are too many things that are application specific that might not migrate gracefully. I see this a kin to the request of a script to port a program to a different language. Doing this kind of thing and have it always work correctly is a very hard problem.

All that being said, there are a set of steps you can take to help yourself through the process. I've been working on an application that runs as a Java application on the desktop and as an Android app on the phone. Here is a list of things I had to go through when designing the system.

  1. Make a list of all the APIs that your application uses that are Android specific. Any of the UI code, logging, database access, etc.
  2. Come up with your own internal API that allows your core application logic to work independent of what platform it is running on. Some of these things don't require you to write a lot of code to achieve. For example SLF4J provides an abstraction that allows you to plug in a number of logging frameworks, including Android's Log API.
  3. Move all the core code into its own library. This way all the core functionality and logic can be written once and used on any platform just by listing the library as a dependency.
  4. Come up with a UI that makes sense for the platform you are targeting. A long scrolling list works very well on a phone, but is likely not the best idea for a desktop application. The screen aspect ratio and resolution is different as are the IO devices. It is OK to try and establish a consistent look and feel, but make the base UI decisions based on what the platform dictates.
like image 139
unholysampler Avatar answered Oct 21 '22 10:10

unholysampler