views:

136

answers:

3

Lately I've been doing a lot of web development on my Droid via ssh using the ConnectBot app and a few other apps for reference. I've also been doing a lot of Android development back home in eclipse, and I wondered: would it be possible to develop and test my android projects right on my phone? All I can do at the moment is either write the code via ssh and then open it later with eclipse to finish it up, or remotely use eclipse via LogMeIn Ignition or VNC. Does anyone know a native way to do what I'm trying to do, preferably offline?

+3  A: 

Not sure if this hits the target you're looking for, but The Scripting Layer for Android (formerly known as the Android Scripting Environment) is available and has a lot of power available to it.

Scripting Layer for Android (SL4A, formerly known as Android Scripting Environment or ASE) brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device. These scripts have access to many of the APIs available to full-fledged Android applications, but with a greatly simplified interface that makes it easy to get things done.

Scripts can be run interactively in a terminal, in the background, or via Locale. Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell are currently supported, and we're planning to add more. See the SL4A Video Help playlist on YouTube for various demonstrations of SL4A's features.

dash-tom-bang
A: 

I really don't know if it's possible, but to do it, you should:

  • "Install" java inside Android.
  • "Install" ant
  • run ant debug

Check this link for more instructions.

PS: Please let us know if you could do it :)

Macarse
As I understand it, Android doesn't run Java directly, it compiles it to an executable format. I'm guessing actually installing Java on your phone would be problematic (If not, I'm trading in my iPhone!)
Bill K
You should be able to compile the Ant sources to the Android bytecode format. But I have no idea how you'd make javac run on Android, since that's a native program.
Mike Baranczak
+1  A: 

I found DroidScript. It's a quite powerful JavaScript interpreter thats based on the Rhino-library. It can import every Java-package and even create activities for starting from the launcher. The URL is http://droidscript.se for the Live-Editor with which you can edit scripts online and send them to your phone, and the droidscript-app has an editor, too but it cant save at the moment, i think. DroidScript is Open-Source and embeddable in an own app, I think. More info on news of DroidScript are found on droidscript.blogspot.com.

arne.jans