Web development on the Android Desire S

Oct 29, 2011 13:03

Well bugger me, it never, ever occurred to me that I may be able to do this on a phone! I've accidentally discovered I can make web pages on my phone and FTP them to a remote server.

This basic little demo page was coded as a result of the following experimental process. I used the following three apps:I had already downloaded the excellent ES File Explorer, which allows me to move files around on my phone, rename them and so on. This got me wondering about coding my own apps and things, and also wondering if there was a way to create a local ('permanently-on-phone') web app ('thingy that gets info off the web'), or perhaps scripting for the phone (automating a few functions).

920 Text Editor

I started looking for a text editor in which to bash out some HTML. I found 920 Text Editor and installed it. I set it to highlight HTML tags (Menu-> Highlight -> HTML), though it will also highlight PHP, ASP and so on.

Tapping in code is made easier by the row of icons at the top of the screen which contain shortcuts for curly brackets, angle brackets, the ubiquitous semicolon and so forth.

A quick and dirty HTML page later, and I wanted to find a way to check it on my phone.

I saved it to my SD card in the 'My Documents' folder

Opera Mobile

Selecting the little 'page with globe' icon on the tool bar gave me the option of opening the file in different browsers. I like Opera the best on mobile devices so I chose that.

You can of course set the browser to file://localhost/mnt/sdcard/My%20Documents/test.htm, to use my example. I've bookmarked file://localhost/mnt/sdcard in my browser for convenience.

Wow, it worked. Now how do I get it onto my server?

FTPing to Website

This was the bit that made me happy. Hell, it's all made me happy so far, but this was the best bit.

ES File Explorer has FTP functionality. It can move files from the phone to a website on the internet. Go to Menu -> Show Tabs and touch the FTP tab. You'll find an empty screen with the helpful message 'Add FTP by Menu->New->FTP'. Do so, and enter the details of your FTP location and details and you're away.

It's a very minimal setup, and building a large website on it would be very fiddly, but it could be useful for correcting typos and so on on the fly.

A couple of caveats though:

File size limitations

Firstly, I'm not sure what the largest file I can use on my phone in 920 is. I have an 8GB SD card which I may backup and replace with a 32GB at some point. I'm concerned that I may unwitingly end up with a atruncated file!

Use WiFi

There's always a possibility I may end up crapping all over my data-limit if I use my mobile provider's network instead of WiFI by accident. Note to self: ensure WiFi is on, and Mobile data is off.

Anyway, pretty pleased with this so far.

texxor

Previous post Next post
Up