4 ms·
Very nice description of the Android architecture. I understand that all the applications have to be written in Java. But how did Firefox port its browser to An
by reirob 15y ago
Very nice description of the Android architecture. I understand that all the applications have to be written in Java. But how did Firefox port its browser to Android? I doubt they have ported it from C++ to Java. At least from the article I do not understand what is necessary to write Android applications in non-Java languages. Can anybody please explain or give a link?
- koko775 15y agoWhat you're looking for is the NDK. Here: http://developer.android.com/sdk/ndk/index.html http://developer.android.com/sdk/ndk/index.html
- nl 15y agoTo expand on this - apps on Android do not need to be written in Java. To use the full Android SDK, you can write in any language that produces Java .class files (eg, Java, Scala, etc). However, if you are happy to work at a lower level you can use the NDK (= Native Developer Kit, linked in the parent), which lets you work in C with a fairly traditional Linux/C API. It also gives you access to OpenGL etc etc.
- kelnos 15y ago[The NDK] also gives you access to OpenGL etc etc. The Java interfaces also give you this. Unfortunately, since OpenGL is mostly about making a ton of little function calls that build up a list of GL commands, it can be kinda slow since each call has to cross the JNI boundary. But it's performant enough for most things, and you can find your bottlenecks and drop down to native code where necessary.