[scala] Scala on Android

View: New views
3 Messages — Rating Filter:   Alert me  

[scala] Scala on Android

by Stéphane Micheloud :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi everybody,


Scala version 2.6.1-RC2 provide sbaz packages for the Android,
J2ME/CDLC and MSIL target platforms.

    http://www.scala-lang.org/downloads/targets/


NB. As a reminder release candidate versions of the Scala software
     are made available from the "lamp-rc" universe. More information
     can be found on the page

        http://www.scala-lang.org/downloads/sbaz.html


Let's now try the example "NotePad" adapted (Scala sources) from
the Android distribution (works both on Unix and Windows):

sbaz> bin/sbaz showuniverse
SimpleUniverse "lamp-rc" (http://scala-webapps.epfl.ch/sbaz/lamp-rc)

sbaz> bin/sbaz install scala-android
planning to install: scala-android/2.6.1-RC2
Installing...


sbaz> cd doc/scala-android/examples/NotePad/
NotePad> ls
total 40
-rw-r--r-- 1 4740 2007-12-14 14:29 AndroidManifest.xml
-rw-r--r-- 1 8474 2007-12-14 14:29 build.xml
drwxr-xr-x 6 4096 2007-12-14 14:02 res/
-rw-r--r-- 1 6743 2007-12-14 14:29 sample_notepad.png
-rw-r--r-- 1 3973 2007-12-14 14:29 sample_note.png
drwxr-xr-x 3 4096 2007-12-14 14:02 src/

NB. The (user-specific) Ant script file "build.xml" was generated
as described on the page:

        http://www.scala-lang.org/downloads/targets/android.html


NotePad> ant
Buildfile: build.xml
[..]
package-dex:
      [echo] Packaging dex...

package:

BUILD SUCCESSFUL
Total time: 1 minute 14 seconds


NotePad> ls bin
total 8436
drwxr-xr-x 5    4096 2007-12-14 14:30 classes/
-rw-r--r-- 1 4704310 2007-12-14 14:31 classes.dex
-rw-r--r-- 1 1032485 2007-12-14 14:31 NotePad.apk
-rw-r--r-- 1 2864514 2007-12-14 14:30 NotePad.jar

NotePad> emulator &
NotePad> adb install bin/NotePad.apk

NB. Both "emulator" and "adb" are Android commands located in
     directory $ANDROID_HOME/tools/.


Bye
--Stephane

Re: Scala on Android

by Steve Lianoglou-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi,

On Dec 14, 2007, at 8:56 AM, Stéphane Micheloud wrote:

> Hi everybody,
>
>
> Scala version 2.6.1-RC2 provide sbaz packages for the Android,
> J2ME/CDLC and MSIL target platforms.
> <snip>

I just wanted to say thanks for putting this together ... this is  
awesome!

Cheers,
-steve


Re: Scala on Android

by Stéphane Micheloud :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi everybody,


Scala 2.6.1-final provides 2 Android samples (NotePad
and Snake) you may install using sbaz from the "scala-dev"
universe :-)


Bye
--Stephane


Stéphane Micheloud wrote:

> Hi everybody,
>
>
> Scala version 2.6.1-RC2 provide sbaz packages for the Android,
> J2ME/CDLC and MSIL target platforms.
>
>    http://www.scala-lang.org/downloads/targets/
>
>
> NB. As a reminder release candidate versions of the Scala software
>     are made available from the "lamp-rc" universe. More information
>     can be found on the page
>
>        http://www.scala-lang.org/downloads/sbaz.html
>
>
> Let's now try the example "NotePad" adapted (Scala sources) from
> the Android distribution (works both on Unix and Windows):
>
> sbaz> bin/sbaz showuniverse
> SimpleUniverse "lamp-rc" (http://scala-webapps.epfl.ch/sbaz/lamp-rc)
>
> sbaz> bin/sbaz install scala-android
> planning to install: scala-android/2.6.1-RC2
> Installing...
>
>
> sbaz> cd doc/scala-android/examples/NotePad/
> NotePad> ls
> total 40
> -rw-r--r-- 1 4740 2007-12-14 14:29 AndroidManifest.xml
> -rw-r--r-- 1 8474 2007-12-14 14:29 build.xml
> drwxr-xr-x 6 4096 2007-12-14 14:02 res/
> -rw-r--r-- 1 6743 2007-12-14 14:29 sample_notepad.png
> -rw-r--r-- 1 3973 2007-12-14 14:29 sample_note.png
> drwxr-xr-x 3 4096 2007-12-14 14:02 src/
>
> NB. The (user-specific) Ant script file "build.xml" was generated
> as described on the page:
>
>        http://www.scala-lang.org/downloads/targets/android.html
>
>
> NotePad> ant
> Buildfile: build.xml
> [..]
> package-dex:
>      [echo] Packaging dex...
>
> package:
>
> BUILD SUCCESSFUL
> Total time: 1 minute 14 seconds
>
>
> NotePad> ls bin
> total 8436
> drwxr-xr-x 5    4096 2007-12-14 14:30 classes/
> -rw-r--r-- 1 4704310 2007-12-14 14:31 classes.dex
> -rw-r--r-- 1 1032485 2007-12-14 14:31 NotePad.apk
> -rw-r--r-- 1 2864514 2007-12-14 14:30 NotePad.jar
>
> NotePad> emulator &
> NotePad> adb install bin/NotePad.apk
>
> NB. Both "emulator" and "adb" are Android commands located in
>     directory $ANDROID_HOME/tools/.
>
>
> Bye
> --Stephane