The title tells most of it. I know that Java is the main one for Android but I heard that other languages could be used? Can someone help clarify please, thank you.
Java is the main one, there's the NDK which allows for C programming, but you need to recompile for different handsets. Also Renderscript. A C derived language. There's also been ports of Python to Dalvik, as well as some other languages. Theoretically any language that runs on the JVM can be ported to the DVM. Not sure about ART though.
If you want an example of how to work around the Java requirement then helios has a project that he is working on that is almost 100% C\C++: http://www.cplusplus.com/forum/lounge/137878/
I haven't figured out why some hardware is language specific. Is the OS just a giant interpreter for a few languages? If the OS can call machine code any language should be able to compile into that, provided it has an appropriate compiler.
Is the OS just a giant interpreter for a few languages? If the OS can call machine code any language should be able to compile into that, provided it has an appropriate compiler.
Well... Sort of. The OS can be considered an interpreter at the API level.
Part of the problem is that new platforms need new runtimes to support a given language. For example, you could probably get a Haskell program to build for Android, but would you want to call the C stdio through the FFI every time you wanted to use the file system?
Another example: although the Android NDK comes with feature-complete C++11 compilers, the standard libraries are still far from complete. So you have a C++ with lambdas but no std::unique_ptr. Older platforms were even worse, though. PSP didn't even have sstream.