Using Android libs on a desktop Java VM (like OpenJDK or OracleJDK) – Education Career Blog

I have never tried out the Android SDK and do not own an Android phone. However it seems that certain libraries are excellent, for example the text to speech lib. Is it possible to use this library with a desktop VM and did anybody here try this?

,

You could get the sources from android.git.kernel.org and try to rebuild them against a desktop environment, but it would be a lengthy project – you need not only the java stuff, but the underlying drivers, native libraries, customized c library, and add-on os functionality to support them.

The android SDK includes a qemu-based phone emulator in which most functionality works as on the device. This should be fine for playing with the capabilities, though is not something you would want to use to deploy them. There is also an x86 community build of android which people put on netbooks or run in virtualbox. Word is that the official android emulator may be moving to something similar since it’s substantially faster to run x86 code on a customized os image in a vm than to emulate an arm processor.

There’s also something of a simulator which tries to provide enough of the android o/s services to sort of run apps natively on the development machine without a vm, but the google folks have implied its a bit of a hack and not well maintained.

Leave a Comment