9.4. InstaFlickr: Shoot and Upload Photos to Flickr

With InstaFlickr, it takes only about 10 seconds to shoot a photo and upload it to your Flickr account (the actual time depends on your network connection). No need to configure or type anything – just point, shoot and upload! This application is made possible by the Flickr Web API (www.flickr.com/services/api) which allows you to upload photos to your account programmatically.

There are two tricky issues in the implementation of this application. First, as the photos are uploaded to a personal Flickr account, we must go through Flickr's four-step authentication process. Second, since this application sends a lot of data, in contrast to MopyMaps! and EventFu, which mostly receive it, we have to use a special method for making the requests. Luckily, we can solve these tasks using techniques that have been introduced already.

Figure 9-3. InstaFlickr (a) menu, (b) viewfinder and (c) upload progress bar

The InstaFlickr source code is divided into six parts. As before, the parts should be combined into one file to form the full application. The parts cover the following functionalities:

  • constants and result parsing

  • handling Flickr tokens

  • making signed calls to Flickr

  • data uploading

  • taking photos and implementing a progress bar

  • user interface functions.

You need to apply for a Flickr API key to use the application. You can get one at ...

Get Mobile Python: Rapid Prototyping of Applications on the Mobile Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.