What do the following have in common?
Weather Channel Max – an iPhone weather app. StockWatch – an iPhone stock prices app. CNN Mobile – an iPhone news app. FlightTrack – an iPhone flight updates app. Tweetie – an iPhone twitter app.
They are all apps which provide users with updates to their phone when some information changes. The information in question is different. But they’re all ways for users to get information that they are interested in, while they are on the move.
Having a dedicated hard-coded app for each type of data is great for information that a large number of people are interested in.
For example, there are enough people who are interested in the weather that it’s worth having an app dedicated to it.
But what if you want updates for information that isn’t so widely needed? What about niche interests?
We’re all different. There is going to be something that you’re interested in that not everyone else is. Or at least a particular set of interests that noone else exactly shares.
People’s needs and interests are almost infinitely varied, so we can’t come up with enough applications to meet everyone’s unique needs. Particularly for more esoteric topics, which are too long tail to each justify a specific mobile app.
For these situations, we need something generic that individual users can customise.
This was an idea I played with on the last IBM HackDay. I managed to get a proof-of-concept working on the day, but not had the chance to share it before now.
What I tried to create was:
- a generic mobile application – something that can display an arbitrary number of bits of information
- a browser extension approach – some way that a user can pick any bit of any webpage, adding it to their list of information that will be pushed to their mobile
I’ve recorded a video of it running. (Difficult to see without full-screen – sorry!)
To summarise, the steps involved are:
- User visits a webpage at their computer
- User highlights a portion of the page, and uses a Firefox extension to register this with my notifications server
- The notifications server informs the mobile app of the new topic of interest
- The notifications server continues to monitor the webpage
- When the highlighted portion of the webpage changes, the updated contents are pushed to the phone
- The mobile app notifies the user of the change
The video shows several examples of this, such as tracking:
- Current score for a particular sports match taken from a news site
(if you want to follow a game and be notified on your phone when someone scores)
You could visit BBC Sport Online, find the page for the match you are interested in, and highlight the text where the score is displayed - Whether a particular product is in stock at on online retailer
(if you want to buy something where supply is limited, and want to be notified as soon as it becomes available)
You could visit Amazon, find the page for the product you are interested in, and highlight the div where the stock status is displayed - Latest weather forecast for a particular town
(if you want to keep an eye on the weather for where you work, and want to be notified on your phone if the forecast changes)
You could visit BBC Weather, find the page for the town you are interested in, and highlight where the text forecast is displayed - The latest sale price for a particular product
(if you’re waiting for the price to drop and want to be notified when it changes)
You could visit Amazon, find the page for the product you are interested in, and highlight the price
I’ve got more examples in the video, but in short: any bit of information that can be accessed online could be monitored by my notifications server, and pushed to the phone of the user who requested it.
I want the system to be simple enough that it would be suitable for short-term things, like the score of a football match.
The resulting set of information is unique to a particular user: a set of information that it is unlikely any other user would have wanted. And this can include information from any website, without needing the individual websites to make data available in a feed or API.
The result is a way for a user to be notified of information that they are interested in. And without any need for them to pay the network costs or battery life costs to repeatedly poll multiple web sites. Or even to have to remember to visit (and keep refreshing) the webpages.
This post is already too long, so I’ll save writing about how I’ve done this for another post. In the meantime, I should clarify that I didn’t write all of the Firefox extension by myself – I used the brilliant XPather to do the tricky bit of extracting a bit of webpages.
Really interesting post (i have been reading about MQTT thru ur blog). I look forward to reading how u did the above example.
Hi dale,
was looking through ur blogs, this seems to be very interesting, just though if u mind to share how do you do the notification monitoring, MQTT can send the notification but how do you monitor the updates from website, is that an engine done by yourself or its XPather which im quit confused. mind to share?
There are XPath libraries around for most languages. I think I used python for this one, if I remember correctly.
[…] since written other Android MQTT apps, such as a hackday app for pushing updates from websites to your phone and learnt a lot about how to do it properly. Well… if not properly, at least a little […]