views:

661

answers:

4

Can I use other JVM languages besides Java (e.g. jruby, jython, clojure) to program for android, or is it java only?

There was a similar question asked over a year ago but I wasn't sure if there'd been any change since then.

A: 

From a little searching it looks like there already exists a JRuby scripting environment for the Android platform.

Malachi
+3  A: 

Check out these links:

However, I am unaware of any prominent applications that have been coded in any of these languages. The examples I've seen fall more into the "proof of concept" category. While the cool factor is high, I still don't see these languages as a viable tool for serious Android developers. I'd love to see someone prove me wrong though!

It seems like Scala is the closest to getting there right now.

dbyrne
+1  A: 

I'm not sure how other JVM language performs, but I really think Scala is the one that could use for a serious Android project.

Of course it has some problem (like Google Maps Android API is not usable without some workaround), but it works very well with the default Android SDK.

I personally use Scala to develop my Android application (Maidroid Reminder) which is already been download about 5000 times according to the statistic of Android Market.

It's not a "prominent" application of course, but it uses lots of feature of Android SDK, like ContentProvider/Broadcast Receiver/MediaPlayer.... etc, and it works very well and I felt much more fun than coding in Java.

And the best thing of using Scala to develop Android application is that the user don't need install any runtime like Android Scripting Environment needs!

Just release your APK file, and the user could install your application using Android Market or ADB.

If anyone is interested in how an Android application written in Scala looks like, you may browse the source code at GitHub.

Brian Hsu
Do I hear the sound of a muted trumpet? :-) :-)
Stephen C
I am sure it felt more fun than using java (I love scala), however I am curious if you also felt like you were more productive?
dbyrne
@dbyrneI believe it is. Pattern matching,implicit conversion and type inference save me from a lot of typing, and high-order function,closure and traits let me write code without thinking how should I do it, it just tell what I want and it just works (ex. Filter out something or do some tranform)! ;)
Brian Hsu
A: 

Currently most dynamic languages perform poorly on the Android Dalvic JVM. They will run but with more CPU and memory useage than you probably want. I hear they are working on improving that though.

Jeremy Wall