-: As I mentioned, 2 2
there are basically two types of notifications 3 3
and that would be local notifications 4 4
and push notifications. 5 5
Now the two types are related as you will see, 6 6
but it is important to understand 7 7
that we generally have these two types. 8 8
Now, what are local notifications? 9 9
Local notifications are notifications 10 10
that are scheduled and triggered and handled 11 11
on one and the same device. 12 12
So they are triggered by the app 13 13
and displayed locally to the user. 14 14
They never leave the device. 15 15
Local notifications are never sent or shown 16 16
to other users or other devices. 17 17
They stay on your device. 18 18
Now you might wonder when this could be useful. 19 19
Why would an app send a notification to itself? 20 20
Well, here's an example you probably all know. 21 21
A reminder app. 22 22
If users use a reminder app, 23 23
it is quite common that you can set, like, a deadline 24 24
or simply a date and a time when you want to be reminded. 25 25
And that can be achieved with local notifications 26 26
for example. 27 27
There, you don't really need a server or a backend 28 28
or any other users. 29 29
You just want to remind yourself. 30 30
And therefore, of course, 31 31
a local notification should be triggered 32 32
so that even if the app is closed, 33 33
that feature still works and you get this reminder. 34 34
I mean, that's the whole idea of this app there. 35 35
And a reminder app is just one example. 36 36
You will notice that many apps on your device 37 37
send you local notifications from time to time, 38 38
reminders that you should use them again 39 39
or anything like that. 40 40
Now we also have push notifications though. 41 41
These are notifications 42 42
which are not triggered by the app for itself, 43 43
but which are received by the app, sent by someone else. 44 44
And I will, of course, 45 45
show you how to send a push notification in this module. 46 46
Now, when a push notification is received, 47 47
that in turn then shows such a local notification. 48 48
So that's the connection we have. 49 49
But a push notification is sent by someone else, 50 50
by a server, by another user, 51 51
by some interaction in an app on another device, 52 52
a push notification is not triggered 53 53
by your local app installation, 54 54
but instead it is received from outside your device 55 55
so to say. 56 56
So push notifications are notifications 57 57
that are sent remotely to one or many users and devices, 58 58
and they then show up on those devices 59 59
to lead those users to do something. 60 60
For example, open the app. 61 61
Examples here of course, would be chat apps, email apps, 62 62
where maybe you as the seller of an item 63 63
get a notification if someone ordered an item. 64 64
So there are plenty of applications out there 65 65
where something happens 66 66
and a push notification should be sent. 67 67
In addition to such triggers 68 68
that would happen inside of an app, 69 69
we could also have marketing push notifications 70 70
where all users of an app 71 71
get a marketing push notification 72 72
sent by the developer of the app. 73 73
Now, as I mentioned, 74 74
we'll have a look at sending push notifications later. 75 75
I want to start with local notifications.