Hi this is a minute of overpass, my name is Eric and I make apps!
Now today, let's talk about push notifications!
Okay so today I want to talk about push notifications and yes, I brought back the
green screen, I know some of you hate the green screen! Rodrigo, you always say you
hate the green screen. Yeah, I'm bringing it back just for today. So today I want
to talk about push notifications. Now push notifications are a way that if you
have users who have installed your app and haven't used it in a long time, as a
way to reach out to them. It's also a way to just send
notifications to people, whether or not they have your app open or not. And
in terms of clients, we have a lot of clients that
use it for
alarms and stuff to notify their staff of certain things. And it's the kind of
thing which we have not used in our own apps, but we've used it for a lot of
client apps. So, if there's something about push notifications, if you're
trying to sell an app to a client, they just love that idea. They
love that the push notifications kind of pushes it over the edge. They can either
reach out to their customers whether or not they have the app open, or
they can use it for an alarm system and stuff like that. So now the
way that push notifications work is, when you set them up you basically,
like for Apple, you would set up your iPhone app, you have to give it push
notification entitlement and you also have to set up a certificate, and you
have to do the same thing with Google Cloud messenger or GCM network. So you
have the the GCM or the APNs, Apple push notification service. So let's say you
open up your application and if it's registered with those, it will
automatically go to those services and register and then the user will be asked,
"do you want ear spy to be able to send messages", and you say "yes" or "no" and
it gets a token back from them. Now, for a lot of the apps that we've done, at that
point we have to hold on to that notification because that on its own
doesn't really help anybody. You need to be able to have a way to push those
messages to them, and a lot of times that means you have your own server. So to let
you know the flow of some of the applications that we've done for in the
past, it would be like, you know, they open up the app, the user opens up the
application, it goes to either APNS or the GCM networks, and
windows has their own too but I'd never actually use that, just so you know. So
it goes to those, it gets that token and it comes back with
that token, and then you could take that token and wait until they login or
register, and once they do that, at that point you can associate that user with
that push notification. Or, if you don't care who the user is and you
just broadcast everything to everybody, or based on location or whatever you
could do it before asking their details. So at that point, you can take that token
along with the login details and put that to your server. And then at that
point you can have your server send the notifications to the APNS or
the GCM and then that handles sending it to the user. So it's kind of this flow,
the way that it goes. And it gets a bit complicated. Now, I've learned this
firsthand, especially in the beginning when we started doing this, it's
really difficult because you have to think about, so if you have
a cross-platform app like, say it's available to users on Android and on
iPhone, you have to think about which phone are they actually using.
So we were, like in the beginning just to give you an example,
every time the user would log in we would take that last push notification
thing and we would overwrite a single field in the database, and
we have to say if it was Android or iPhone. So for people who had a
tablet and a phone, if they registered with their phone first and then their
tablet, the phone would no longer get the push notification. So we have to start
associating multiple devices with that user. Now, there's
lots of services, I mean there's lots of services out there that take care of it
for you. There's firebase, firebase does this for you. There's some
called 'air push'. Amazon has one called SNS - Simple Notification Service which
they take all that complexity away for you, managing
who belongs to what. Microsoft Azure has one called
Notification Hub. You know, a lot of these things that we've used, and they seem
like a bit of overkill because you don't really need them and a lot of times
they'll charge, but it's usually really low. I think the Amazon one charges
50 cents per million messages, so it's not that that big a
deal, and it does make the development process much easier.
So it gives you a lot more flexibility and a lot of times though, if
you're dealing with client applications they have to assume
that cost going forward, depending on your payment model and stuff
like that. But it does make it easier, so that way you can have multiple
devices. Now, there's lots of ways that you can use this. You use it with chat
applications, so let's say I'm on the phone and I want to send a
chat to my friend who also has the app installed, I could select him, send the
push notifications, that would go to the server, the server would see my friend
and that would look up the friends token ID, look up
that, send the message to the Apple push notifications or the GCM, and that would
send it back to his phone. So it really works, and in terms of marketing I have
to admit I haven't actually used it, and I would like to know how. If you guys
have used push notifications in terms of marketing, because theoretically I have
thought about doing it so we could we use analytics to track how
often the app is being used, and we could say: For each user
who has it installed but has not used the app in like the last month, maybe we
can send them a push notification just to say something relevant. You
know, I don't want to just say "hey, you haven't used it in a while" just say
something like "hey, don't forget"... you have to tread softly. If you get too many push
notifications,you'll get uninstalled, that's the
danger of it. And we've all had apps where we've installed it and they just
pester us with these push notifications, so that's the dangerous side. And also,
it has to be relevant. So if I put it in ear spy for example, and they open
up ear spy and it says 'ear spy would like to send you notifications', I can't see why
anybody would allow that. It doesn't fit in with the model of the app. But anyway,
push notifications especially for clients, especially for the way forward,
are probably one of the most exciting things about app development. Because
in the past we've done things with SMS notifications and SMS cost like,
depending on the service you go through, it could cost three
to five pence or three to five cents per notification. So
those are the kind of things you want to use sparingly. We had one where we
wanted to be able to send notifications to the contacts friends, so
they could go and download the app, then we could handle push notifications.
That was a situation where we would go through the SMS route, I think we use
Twilio if I'm not mistaken, and then we use Urban Airship for
push notifications on that one. But anyway it's a really interesting
field, I'd like to know how you guys have used push notifications?Please
leave comments! If you use them for marketing, has it helped you? Have you
had a situation where you've had push notifications which just did not work
out well? And that's it for this week, I'll talk to you guys tomorrow!