Clojure for Android

267 views
Skip to first unread message

James Swift

unread,
Aug 16, 2011, 10:31:47 AM8/16/11
to Clojure
http://dev.clojure.org/display/design/Android+Support

"Issues

Needs a motivated owner"

This topic gets a regular mention but I thought it might be worth
asking again if it's ever likely to get the 'motivated owner' ?

Given that 'reach' was a primary reason for the development of
ClojureScript shouldn't the reach of Android encourage someone to go
for it?

I only wish I was capable of doing it myself :)

James.

Paul deGrandis

unread,
Aug 17, 2011, 1:33:32 AM8/17/11
to Clojure
I'd consider taking this. I've worked a little bit behind the scenes
to get Clojure to run better for me personally on android. Recently,
I've been working to get ClojureScript to work well for SL4A
(Scripting Layer for Android).

I wanted to try to get a native Clojure package working for SL4A, but
given that the above works pretty well, I need some sort of real
motivation to continue the work.

Paul // OhPauleez
http://www.pauldee.org/blog

daly

unread,
Aug 17, 2011, 6:41:59 AM8/17/11
to clo...@googlegroups.com
I have written several android apps so I can help with
some questions. Unfortunately I am completely swamped
otherwise. If you make it a project on Github that would
be useful.

Tim Daly

Raju Bitter

unread,
Aug 30, 2011, 8:13:05 PM8/30/11
to clo...@googlegroups.com
There are 3 approaches you could take for using ClojureScript to
develop an Android app:

1) Use ClojureScript in combination with PhoneGap: the generated
JavaScript will then be run inside a webview component (headless
browser).
2) Build a normal Android app with a Java/Android based UI, accessing
a ClojureScript API. In that case the UI will be fully rendered using
Java (better performance), but you could still use a ClojureScript
library which you already have.
3) Use ClojureScript to build a WAC/W3C widget (an HTML/JavaScript
page with an XML descriptor file). Opera provides a WAC widget runtime
Android app, and a number of operators and device manufacturers have
added support for WAC/W3C widgets directly into their phones.

If you access APIs for generating apps (e.g.
https://build.phonegap.com/), you could even package an
Android/iOS/... app without the need to install a mobile app SDK on
your machine.

I've personally used approach 1) and 2), and if you are interested we
could start working on a proof-of-concept app using both approaches
this weekend. Here's a Github repository I'll be using to share code
with you:
https://github.com/raju-bitter/clojurescript-android-phonegap

Some links:
W3C Widget http://www.w3.org/TR/widgets/
Wholesale Application Community http://www.wacapps.net/
Opera releases WAC-ready widget runtime for Android
http://www.opera.com/press/releases/2010/12/22/
PhoneGap Build service: https://build.phonegap.com/

- Raju

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

Reply all
Reply to author
Forward
0 new messages