It was the afternoon of HackDay… and I’d tried a couple of hack ideas without a massive amount of success. I wanted to have something functional to show by the end of the day, so thought I’d give something easy a try.
I’d spent quite a bit of the morning getting to know the Windows Mobile camera API, so I thought I’d try and use it in an application.
Background
My Windows Mobile cameraphone comes with a basic camera app. Then you can do what you want with your photos.
The idea
I thought I’d try writing an alternative camera app that makes it easier to do some things with photos – such as uploading to flickr, posting to a WordPress blog, sending by email, and so on.
Why?
Without sounding like a Kodak advert, photos are more fun if you can share them. Anything that makes that easier could be a good thing.
What was the plan?
It was fairly late in the afternoon by now, so I went back to managed code. The app is based around using the CameraCaptureDialog to get an image, then offer a bunch of things to do with it.
flickr – A chance to play with a web service – I went looking for the flickr API for uploading pictures.
This lets the user fill in the title, description and some tags and add it to their flickr space without needing to leave the camera app.
And I reused some old GPS code to add the ability to give flickr the location that the photo was taken. This is quite neat – although you can use email to upload to flickr from a phone, it would be much harder to include the location.
WordPress – Ah… erm… yeah… I kinda ran out of time and never got round to this. 🙂
email – A simple form that will let you send the photo as an attachment in an email.
add to Contacts – Windows Mobile can attach pictures to contacts in the Outlook address book – so that someone’s picture is shown when they phone you, or next to emails and text messages that they send you. This form gives you a list of contacts in your address book, and lets you choose one for the photo to be added to.
add GPS location to EXIF data – flickr has a weird way of handling GPS location data – it doesn’t seem to use EXIF tags as you might expect, it has it’s own way. But I thought it might be nice to add the ability to add the GPS location where the photo was taken to the photo’s EXIF data.
I managed to get the GPS location okay, but wasn’t able to add it to the photo. The .NET functions to add EXIF tags to photos, like SetPropertyItem are not included in the .NET Compact Framework that you get on Windows Mobile, and I ran out of time before I could work out how to add the data in manually.
And there it is. Not entirely finished, but by this point it was about 6pm on a Friday evening, and HackDay was over.
Interesting to read about your hacking attempts.