Recently my evenings seem to have been disappearing in the blink of an eye. It is funny that when you get really into a bit of computer programming time can seem to disappear quite quickly. It can be quite a fun and mentally challenging way to spend time, not to mention absorbing. So I am hoping the project I am working on will enable more people to join that fun by writing small programs on their tablets. I am working on a version of the Scripting Layer for Android ("SL4A" – which used to be known as the Android Scripting Environment) and adapting it for tablets, especially the EEE Pad Transformer. The aim is to make the package work well on tablets and to adjust the user interface to make the most of the screen and new features such as the Action Bar.
SL4A is a great app that can host facilities that enable people to create and run scripts in languages like PHP and Python on the device itself. It means you can write scripts that make use of the features of the device and experiment without having to use another machine and a full blown software development kit. It doesn't give you quite enough to make a complete “app” but it does give you enough to experiment and it could also be a useful app for people learning programming. It is worth looking at the Android Scripting Tutorials page for an idea of what is possible. Fortunately it is an open source application which means that people can take a copy and adapt, learn from and experiment with it.
Creating your own branch of the SL4A source code is very easy. The project makes use of the a decentralised source code control system called Mercurial which is hosted on Google Code. You can go to the Source tab of the project website and click on a button labelled Create a clone then enter a few simple details and you're done. Your own branch of the source code can be checked out and you can check it in and make changes as often as you like without affecting anyone else. It is possible later on to merge branches back together. A good diagram of how this works can be found on the Understanding Mercurial page. I am using the MercurialEclipse plugin with Eclipse on an Ubuntu machine for development. The site also gives instructions on how to build the app.
So far I have adjusted most of the screens in the application for use on tablets. This has included work to move many options previously found in the options menu up to the Action Bar and adapting it to use the Holographic theme of Android 3.x. Here the Optimizing Apps for Android 3.0 page is an essential read. I have also been ironing out a few issues in the app for features that did not work on the EEE Pad very well. This has included fixing the detection of the bracket keys on the hardware keyboard (from a fix found in Lorant Kurthy's version of ConnectBot). There is still some way to go though as I need to work on the app a bit more to get it looking how I want and to sort out a couple of remaining issues. Below are a couple of screenshots that show how my version looks today.
Open source software has many benefits and one that doesn't always get thought about is its use as an educational resource. It gives us the opportunity to see how others have solved problems and build up our own experience by getting that software to do new things. This is exactly what I am doing here, adapting SL4A is teaching me a lot about Android platform and broadening my experience. It is a great app and hopefully this new version adapted for tablets will be enjoyable and educational for people to use. My aim is to have a version that people can use available as a download in a few weeks. I will also of course be making the full source code of my version available too.