Comment Re:Android is not always Java (Score 4, Informative) 577
NativeActivity doesn't support most of the Android APIs, including most obviously the widget toolkit. It's intended for games that just need an OpenGL context and raw input, all other kinds of apps still need to use Java.
And you know what? That's not such a bad thing. A few years ago I guess I was basically a C++ programmer who was in the "Java sucks" camp, and I came back to Java only because I wanted to write stuff for Android. Over time I've come to appreciate the whole platform and ecosystem more. Things I especially appreciate:
- IntelliJ IDEA and the Inspector. My previous experience with Java IDEs was Eclipse, which is not only incredibly slow and resource intensive but also has a very confusing IDE. Over the years this situation has changed - IntelliJ is genuinely helpful, and uses much more reasonable amounts of RAM than such IDE's used to. I find myself very much appreciating the real-time, on the fly static analysis that can find all kinds of issues from basic logic bugs to common API usage errors, like inverting the arguments of assertEquals in a unit test.
- Most Java libraries are available via Maven repositories. Maven itself is a rather quirky beast that I never truly warmed to, but the Java world has what is essentially a giant apt-get for libraries. IntelliJ understands how work with Maven such that you can write some code that doesn't compile, press alt-enter over the missing class and tell it to go figure it out. It can find the right library, automatically download it and all its dependencies, install it into the local Maven repository and recompile the code, all on the fly within a few seconds. Coming from the C/C++ world where every single project has a uniquely malformed build system and package repositories (when they exist at all) are maintained by Linux distributors who are invariably miles behind upstream releases, it's extremely convenient.
- JavaFX 8 turns out to be a really nice UI toolkit. Java got a well deserved reputation for awful desktop apps that were clunky, slow, and had UIs only a mother could love. This problem started with AWT that was limited by the lowest common denominator (Motif at a time when nearly the whole world used Windows). Swing was more powerful but was still very ugly and was hobbled by the lack of any truly great UI designers for it (every IDE creator invented their own). JavaFX 8 resolves all these problems: it's designed to be competitive with Cocoa, so the whole thing is an OpenGL accelerated scene graph, it makes it easy to support fancy effects and animations, and it comes with a very straightforward and easy to use Scene Builder app that makes building UIs a snap. I've used the Apple GUI design tools and Scene Builder is even easier. JFX8 seems to make desktop app development with Java actually compelling again.
- Lots of people know it. That means, for an open source project, lots of potential contributors.