Android.Sullivan.za.org

Photo Uploader

This project consists of a .php script that the front end Android application can http post a photo and caption to, this is how new images make it on to this site's home page.

The Android application uses the OI File Manager to pick a photo from the handset's SD card, the file name is returned. It also registers an android.intent.action.SEND to allow it to receive the SEND action (and resulting data stream) from the Android Photo Gallery. Either method can be used for specifying which file is to be uploaded.

There is an 'EditText' component that can be used to enter a caption and a button to start the upload. Upon activation the application spawns a new thread that handles the upload and reports progress to the GUI via a handler.

When the upload is complete the PHP script re-sizes the file to create a thumb nail and stores the original image, thumbnail and caption in seperate files on the disk. I upload the best resolution possible since I don't need to care about costs, but it would be trivial to re-size on the Android/Java side before up load if necessary.

From May 2011, Uploading Android video files works too. The uploaded file is converted to an .flv using ffmpeg and a thumb nail extracted. If the web-end notices one of these a is shown over the thumbnail. The click event opens a page with the JW Player ready to play the video.

The movie below has a short demonstation of the Android side of things.

JW Player

Valid XHTML 1.1 Strict

If you want an .APK or the source of any of these projects please contact me and ask. I would love to hear from you.