Can I use Java for building cross-platform mobile apps?

O Connor picture O Connor · Mar 25, 2016 · Viewed 13.1k times · Source

I have read an article about Xamarin was buying RoboVM and enables developers to write mobile apps in Java for cross-platform. I am not sure if it is possible now to use Java for developing cross-platform mobile apps. Is there any reliable tools where I can write in Java for cross-platform mobile apps development? Is it a good choice to choose Java only for potential cross-platform mobile apps? I don't consider using C, C++, C# for that purpose since I have never been focusing on one of them. I apologize for the fans of those langauges. Or Is it a better choice that I better work with Java for Android apps and Swift for iOS apps? I plan to choose Java as a main language for all web apps, cross-platform mobile apps and robotic programming development.

Answer

Derek Johnson picture Derek Johnson · Mar 25, 2016

I've been using Codename One for quite a while now. Libgdx wasn't exactly an option as I'm not a game developer.

I played a bit with RoboVM before picking Codename One and it seems that it's more about Java for iOS and not about WORA (Write Once Run Anywhere). This might be a good choice for you if that's what you want but I prefer WORA. I tried the RoboVM FX bindings and they were just horribly broken in basic ways.

A few things I love about Codename One are:

  1. Support - I have never used a product with such amazing free support. You get answers within a day at the latest and that really sealed the deal for me.

  2. No need for a Mac - I use my Mac at home but in the office I need a PC.

  3. Customization and familiarity - this is pretty much Swing but WAY better. Like we always wanted Swing to be as they put it...

The docs used to suck but they made a big push on it and it shows. Now if only they could fix the IntelliJ/IDEA plugin to the level of the NetBeans plugin I'd be golden!