Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojure on Android [closed]

Is it possible to program Android apps in Clojure? Can anybody suggest a good tutorial or book, if it is possible?

like image 942
JaneNY Avatar asked Jan 10 '11 21:01

JaneNY


3 Answers

Yes, here is main project I am aware of: https://github.com/remvee/clojurehelloandroid

And here is a little tutorial http://riddell.us/ClojureAndAndroidWithEmacsOnUbuntu.html though I would not be surprised if this tutorial is outdated, as it was over a year ago when I played with the code following this tutorial, and remvee's code has since been updated.

EDIT: see the update here from Stuart Sierra and the Clojure/core group: http://groups.google.com/group/clojure/browse_thread/thread/876c90d3ae353c61

"Clojure 1.2.0 works "out of the box" on Android, but startup time is still a problem. Some members of Clojure/core have experimented with ways to make this better, mostly by selectively removing stuff that isn't needed at runtime.

Follow http://dev.clojure.org/display/design/Android+Support for news. The last update was by Aaron Bedra, a Clojure/core member, in December 2010. I wouldn't say it's a high priority right now, but neither have people lost interest.

I personally would not recommend writing an Android app in Clojure if you intend to release it right away. But if you're interested experimenting with Clojure on Android and making it better, then go for it."

like image 126
rplevy Avatar answered Nov 09 '22 07:11

rplevy


A new option for Clojure on android is ClojureScript.

ClojureScript compiles Clojure into JavaScript which you can then wrap in an app. This bypasses the Dalvik-VM entirely and avoids the load time issues, if your app is suited to javascript. many apps looking for more tight integration with the platform can't use this approach. If your app can live with out tight platform integration this could save you a lot of time.

like image 22
Arthur Ulfeldt Avatar answered Nov 09 '22 09:11

Arthur Ulfeldt


I know this is a bit old, but just in case someone stumbles on this, clojure on Android has come a long way since the answers above. The lein-droid and the Neko projects do make it a lot easier to write full android programs using clojure from begining to end.

like image 30
roland Avatar answered Nov 09 '22 07:11

roland