A few days ago I got an Asus Transformer – an Android table with a full physical keyboard. Since then I have been trying to figure out the best way to write code on this device. While porting Eclipse to Android would be cool, it would also be near impossibly complex. It would also be excessive. What I am aiming for here is a fairly simple toolchain and workflow.
To start with, I would like to be able to:
– Check code out of Git
– Make some changes (preferably with syntax highlighting)
– Commit and push changes back to remote Git repository
And there are a number of ways this could be done…
1) Write pure-Java Android app. There are good Java libraries for most tasks, including a pure-Java Git client. This would still be quite a tough job though as there would be a lot of UI work to do.
2) Native binaries. It is in theory possible to cross-compile all the needed tools, including a shell, git client, vi, etc. The main downside here is how they interact with non-rooted devices. Native binaries must be packaged up inside a .apk like any other app and can only be run by their owning application. For example ConnectBot could not use a local-term to run a git binary from another .apk. A custom ConnectBot build containing the extra binaries would need to be built. Also I have yet to find an example of compiling git for Android. :(
4) Native binaries with bridging app. Take the native binaries from 2) and write a small SSH server app like in 4) that proves ConnectBot access to them on a local connection. Fairly minimal work once the native binaries are ready. I hope.
I keep wondering of anyone else has thought about this yet or better yet got a working solution, but I guess hardware like this are still fairly rare no not many have the inspiration to do the work. I am sure it will come at some point, I am just impatient. :)