android on desktop java April 29th, 2011

One of the things I’ve been excited about recently has been the ability to forklift the non-interactive core of my mobile app onto standard desktop java.  Admittedly, I get excited about such things easily, but this is pretty cool.  The app I’m working on has a core that does some fairly non trivial connection management and location processing and I found that the ability to run it on the desktop has definite bonuses.  For one, it is much easier to simulate connected clients doing interesting things on the desktop than when running a single instance in the emulator.  I even have a couple of “test” robot users that are always logged in and virtually interacting with the system that my real app can talk to and interact with.

This approach wouldn’t work for every kind of app, but when it does fit, it’s pretty powerful.  I’d much rather use my actual real codebase to simulate robot users than have to write something from scratch and I get the benefit of putting the real code through a lot more code-run-debug cycles than it would otherwise get on just the device.

So why aren’t we seeing more of this talked about and done?  It took me about an hour to hack together enough of an android.jar to get all of the basics going.  My results are here: https://github.com/stellaeof/android-desktop-headless .  This was admittedly a quick and dirty solution, but if I had more time it wouldn’t be all that hard to go through and mock/port a pretty large swath of the non-ui platform to be able to run on a standard vm.

This entry was posted on Friday, April 29th, 2011 at 10:40 am and is filed under geeky. You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own site.

No Responses

Leave a Reply