Pushing, pulling, or leaving the door open

October 24th, 2009

This weekend is barcamplondon, so another chance for me to ramble incoherently about a technical topic of my choice. 🙂

My presentation started as a bit of a cop-out. I was ill last week and weekend when I was planning to prepare a new presentation, so I decided to give the same talk I did at Over The Air last month and hope that I didn’t get any of the same attendees.

But then I started tweaking it to suit the different audience. Over The Air is an event for mobile developers, so my presentation was pretty much aimed at mobile devs, which wasn’t quite right for a general event like barcamplondon.

Then I started updating it to reflect the feedback I got, both on the day at Over The Air, and through comments and tweets since.

My talk at OTA was a technical “Introduction to MQTT” session.

My presentation for barcamplondon became a broader look at mobile apps that rely on data from the Internet, and the challenges and choices facing mobile app developers who write them.

And I think it’s better for it. I hope it didn’t come across as pimping MQTT. I still talked about MQTT, but this time it was to use it as an example of one of a broader set of choices:

The aim of the talk was to discuss the pros and cons of each approach.

Read the rest of this entry »

Tracking my location on TV

October 21st, 2009

Location tracking on TV

This is what you see if you press the “Find Dale” button on my TV remote control.

(Well, actually the “Teletext” button… cos I wasn’t using it, and there isn’t another button that makes any more sense!)

The on-screen-display adds a message at the bottom of the screen for a few seconds, saying my last recorded location and when I was there.

People following me on twitter may have noticed me talking about setting up a new home media server: a small Linux server that has become our Freeview box, PVR, home photo album, and music server.

And now it’s set up, it is surprisingly easy to do amazingly useful, and not-at-all annoying things like this! 😉

In my defence, I stopped just short of making the script poll for my location and display an on-screen message whenever my location changes. Which would’ve been very cool, but probably drive my family nuts. So I compromised with a script that runs when you press a button on the remote.

Read the rest of this entry »

Mobile Widgets – the new hotness?

October 21st, 2009

Over The Air was a month ago now, so this post has been sat in draft for way too long. But I thought it was still worth quickly sharing something noticeable from the event.

By way of quick background for those who aren’t familiar with it, it is an event for mobile developers – a couple of days filled with talks and presentations on all things mobile.

And this year, the big thing seemed to be widgets. There were a lot of talks on widgets. So many, in fact that you could choose a session in every time slot that was about widgets.

Read the rest of this entry »

Writing an offline wiki client

October 10th, 2009

Friday was the seventh IBM Hack Day, and I again got the chance to spend a day playing with some random ideas.

As Hack Days go, I had a surprisingly productive day! I had four ideas on the day:

  • two mobile hacks (both of which I wrote a chunk of code for),
  • a twitter hack (which never got off the scribbled diagram stage, but it’s an idea I definitely want to come back to), and
  • a hack to extend an IBM product (which I created an alpha version of)

In this post, I’ll describe what I did for the last of these ideas: writing a client app for the wiki that comes with IBM’s Lotus Connections.

The idea

In the same way that I am writing this post in an offline blogging client, I wanted the same for using wikis: read and make changes to a wiki while offline, with changes uploaded to the online wiki the next time you are online.

This wasn’t a new idea. In fact, I tried it at IBM HackDay 4 back in 2007 but the wiki we used at work at the time had no API access for retrieving or updating wiki pages. So I sort of gave up and forgot about the idea.

But now I use Lotus Connections wikis at work. And Lotus Connections does have an API – an AtomPub API that gives you feeds to know when pages are changed, and a way to publish changes.

So I decided to revisit the idea.

The “finished” (ish) hack

It’s still very rough around the edges (this was a HackDay – I wrote the client code in under a day!) but it already shows the basic idea.

Offline wiki client

The top left view shows the list of your wikis.

Clicking on this fills the list below – a list of pages in the selected wiki. Clicking on a page in that list opens the contents of the page in the main view on the right.

Read the rest of this entry »

Push notifications for mobile apps

September 30th, 2009

Update (1 Feb 2011): I’ve shared some better sample code for Android

Last weekend, I went to Imperial College for Over The Air: a conference for mobile developers.

I gave a talk at the event on how to write a mobile application that uses push notifications. It was pretty well received, so I’d thought I’d share it here, too.

I’ve made some notes below to cover roughly what I said at the event. Any comments or questions (or corrections if you spot any!) are very welcome. 🙂

Update (24/10/2009): I revisited this presentation to address some of the feedback that I got on battery life implications of using MQTT.

Read the rest of this entry »

OAuth authentication from a mobile device

August 31st, 2009

I wrote a post a couple of weeks ago in which I whined about the difficulties in creating a good user experience for a mobile client that authenticates with an OAuth provider.

I was pleasantly surprised (and a little honoured!) to get a comment on the post from Chris Messina reminding me that the way to address the usability issue isn’t to revert back to using usernames and passwords, but for us to all work to improve the usability of OAuth.

Sufficiently inspired, I went back and had another go.

It’s still not quite there, but I think it’s better.

As Andy pointed out last time, not everyone has a Windows Mobile device to try my code on, so this time I tried recording a screen capture of it.

Read the rest of this entry »

(Another!) Mobile app to share where you are

August 29th, 2009

Mobile location sharing is something that I keep coming back to: from finding where my phone is using GPS, Bluetooth, WiFi Access Points, GSM Cell Ids, using my own hand-rolled systems or newer services like Google Latitude, dopplr, OpenCellID and Brightkite.

There is something about the promise of location-based apps which I find very exciting.

This is my excuse, at any rate, for sharing my latest bit of tinkering. 🙂

The stuff that I’ve tried so far has been focused on long-term sharing – apps intended to run in the background on your phone all the time, sharing your location with a pre-arranged list of friends and family who have signed up to the same service.

I’m playing with an app which comes at this from the other angle: an app for specific occasions to share your location. Not something to run in the background all the time, but an app to use when you want to let someone know where you are – a specific person. This could be a friend or family member, or a colleague or client (perhaps someone who hasn’t signed up to any service that you have).

Read the rest of this entry »

Accessing authenticated Google App Engine services from a .NET CF client

August 24th, 2009

Google App Engine (GAE) gives you an easy way to build and host web applications for free.

For any address you specify in your GAE app, you can require users to be authenticated. For example, if you have this in your app.yaml:

- url: /authme
  script: myAuthenticatedService.py
  login: required

When a user goes to http://yourapp.appspot.com/authme in their browser, they get taken first to a google.com logon page and promtped for their google username and password.

Only if they authenticate correctly will Google pass them back to your page, and let them access your /authme page.

(This is kinda nice, because as a GAE app developer, you shouldn’t need to see the user’s password. Although, I guess most users won’t make a distinction between typing in their username and password into the google.com login page and into a login form on an appspot.com page.)

If you are writing browser-delivered apps, this is all fine and works as described. This is slightly trickier if you are writing a web service that you want to be accessed by a client app. I wanted to access a GAE web service from a mobile client – this is how I’m doing it.

Read the rest of this entry »