Push Notification Composition via SMS
For two current projects I’ve needed a really simple way for the administrators to send out push notifications to all users. While I was Initially not keen on this idea, I’ve since convinced myself that in a small set of situations, it delivers an amazing user experience.
The first is for an update to my school app, where announcements can now be sent out as push notifications.
The second is for a small music festival, where notifications need to be sent throughout the day about upcoming events.
I chose the following as important metrics:
Steps/time involved in sending a notification
Ability to add more admin
And a requirement of no training or specific equipment.
Pushing Water Uphill #
The usual way to send notifications is via the website of the provider. I found it took around 2 minutes to log in, get to the relevant page and send the message, (including page load times) on my iPhone.
The website offered too much functionality, and as a result took longer than necessary.
I thought about creating my own stripped down website or iOS app, but they each had their own issues. An app seemed excessive and difficult to install and manage (with ad-hoc distribution), whilst a web interface still required navigating to a webpage and logging in.
Assuming ‘everyone’ has a phone capable of texting, why not treat push notifications as an extension to text messages? Where sending a text to a certain number sent the same message to all users of the app. As ‘everyone’ is comfortable sending a text, no training is required!
Why Even Use Push? #
You may wonder why I’m not just using text’s to deliver the messages, but I believe there is a convincing argument in these circumstances to not.
There is no need to ask for users phone numbers, something users may be reluctant to give, and also to maintain a device independent list. You can also target devices such as the iPod touch and iPad’s, which make up a high user-base of the school app. Finally it is much cheaper, especially when delivering in high volumes.
Although internet is required, most iPhone users have cellular data, so wherever that can receive texts they can also receive push notifications. There is also no net impact on iPod touch / iPad users as they cannot receive texts anyway.
You could also argue to use emails, however the same issue of collecting email addresses is still involved and although the school should have a list, push is still easier.
Finally it gives more control to the user, if they no longer want to receive notifications, they can just turn them off in settings.
Phoney Messages #
The main protection is security through obscurity, keeping the number private, however this really shouldn’t be relied upon.
To overcome this you could whitelist certain numbers - on your first request a reply is sent asking for a passcode, after which your device is whitelisted.
When Push Came To Shove #
Twillio was the obvious option, assigning you a phone number for free on signup. It handles incoming text messages to the number, calling a script on my server which then sent a request to Urban Airship to send the push notifications.
This is very easy to implement on a per-app basis and could also scale quite nicely, apart from requiring a unique number per app (although multiple apps could easily share through whitelisting).
In my examples I’m targeting iOS users, but this could apply to all mobile platforms. I’ve also decided to use Urban Airship, however here are many other great push providers including Parse and Amazon. Finally I have ignored the reliability issues of push notifications as in my examples delivery isn’t vital.
Here is a Gist of what the script looks like.