A few weeks ago I was using the SayNoTo0870 website to find an alternative to the premium rate number for my electricity supplier’s helpdesk. The website is a great little money saving service, but the interface is pretty horrible (it should learn from Google that all it needs is a big search box to enter your premium rate number, and a “Search” button!). This got me thinking… wouldn’t it be even more useful if there was a mobile app that would detect when I try to dial a premium rate number and would look up an alternative geographic number to dial instead? That would effectively make the call free by using my bundled minutes.
I started digging around and sure enough Android does allow apps to intercept outgoing calls (provided they request the appropriate permissions when installed). It’s easy enough to detect a premium rate number (in the UK these are usually numbers starting 09, 084, 087 or sometimes 080 depending on your mobile operator). With premium rate numbers charged at anything from 12p/min upward on my mobile tariff, and with helpdesk calls often resulting in at least 10 minutes of awful on-hold music, this could be a really good money saving app.
A quick search on Google Play showed a few apps that already do this, but most were either paid apps (not that this is necessarily a bad thing, if it supports a committed developer), had an outdated (ugly) UI / were littered with ads, or didn’t automatically intercept dialled numbers.
How would I source the data to lookup alternative numbers? I really didn’t want to resort to screen scraping the website. A bit more googling turned up an API maintained by a chap called Simon Maddox. It’s a simple REST interface that can return plain text, json or xml. Perfect!
So I fired up my IDE, updated the Android SDK and set to work. Like I said, it’s been a while. Android 4.0 ICS was new when I last wrote any code for Android, the Fragment UI model had just been introduced. As much as I’d like this to result in a useful app that I can share, I’m doing this to satisfy my own curiosity as much as anything else and I want to use the latest SDK features, UI patterns and Holo theme. That means that much of the code samples and snippets I have from previous projects need reworking. Despite all that, a couple of lunch hours and an evening or two later and I’ve got an app that’s just about useful. It’s not ready to share yet as there’s lots of stuff I still want to add (and I probably won’t be working on it much more until the new year), but here’s a glimpse of where I’m at…
* they may not all be “great”.
Leave a Reply