Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Java only way to write apps for Android?

Tags:

android

I've searching the Internet for the answer but I can only find answers either that are too old, are confusing or people not answering the question but rather telling to learn Java.

My basic questions are:

  1. Is Java the only way to write apps for Android?

  2. This question will contradict #1. Since Adobe AIR can run in Android phones now, does that mean I can write in AS3 without Java or do I need to wrap the AIR app inside Java?

  3. Are apps like Facebook for Android, Angry Birds and all those fancy games, made in Java only?

  4. If #1==false && me==JAVA_HATER, what language or SDK do you guys recommend. This is my main question.

like image 992
Bidhan Avatar asked Dec 27 '22 23:12

Bidhan


1 Answers

  1. It's the only Google-supported way. There are others, for example Adobe Air; and, if you wanted to do some work to figure out linkage to the standard Android classes, you could copy and modify the Ant recipes in the SDK to work with any language targeting the JVM.
  2. Air apps, as with any other platform, run in an Air virtual machine which runs on the target platform "natively". (Which, for Android, means it was probably written in Java, compiled to JVM bytecode, then transcoded to Dalvik bytecode.) Note that it is possible to write native (usually ARM) code and link it with a basic Java framework, although there are a number of limitations on such code. I would imagine that the Appcelerator mentioned elsepage works by translating the Javascript to something else (there are several Javascript-to-Java translators).
  3. Most Android applications are written in Java. Some apps, especially those that say they won't run on versions of Android below 2.0, have native code libraries. See #2.
  4. Java works "out of the box". With a little work, as I mentioned above (#1), you should be able to write code in any language that produces JVM bytecode and knows how to link to Java class libraries. (I fully expect someone to provide Scala linkage. :)
like image 140
geekosaur Avatar answered Dec 30 '22 12:12

geekosaur