What are push notifications and how do they work? |

push notifications It is not a new term, it is something that we have seen on many occasions and that we have used even without realizing it, but we do not consider what they are and we do not know for sure what it is about or how they work, they simply “are there”. However, it is an important technology when it comes to communicating messages (at the internal application level) and it is not really something new since, in fact, they have been with us longer than we think. In today’s post I am going to tell you a little about these notifications, their origin, how they work and why they are important to take into account at the development level.

notifications push

If we want to understand this technology we must go back a few years ago with the telephone company blackberry. Does anyone remember her? We haven’t seen her in ads for a long time, right? It was thanks to them and their internal mail service that these notifications started to work. Let’s take a look at how this service worked: Previously, if you used a local mail client, such as Outlookof Microsoft, to be up to date with new emails we had to do it manually or set it to automatically query the server in case there were new messages. blackberry he wanted us not to have to worry about that detail and that is why he devised a new technology, which was called push. This consists of It is not the client who makes the query, but the server who sends it; In other words, instead of us asking: “Are there any new messages?”, it is the server who tells us: “Hey, you have a new message”. Apparently there is no difference, but in reality what is happening is that the communication is carried out in the opposite direction. In this way, despite not being instant messaging, the client receives the news and, therefore, we know that we have a new message. This was quite a revolution and it was not strange to see how these terminals became so popular in the US, since the added grace of all this is that the application in question did not need to be active. We simply received the notification and we decided whether or not to consult the new message.

Knowing this, let’s go back for a second to the meaning of “push”. There are two communication technologies: push and pull. The difference is that in push it is the server that sends the query, while in pull we are the ones who consult the server. Think about it this way: there are applications that we have to throw away to refresh them (pull) downwards with your finger, as is the case with Twitter either gmail. While in others, like WhatsApp, it is the application itself that informs us that a friend has sent us a new message. As you can see, I have already mentioned a famous messaging application among users. We will use it as an example to explain the entire journey that the message makes so that the service push return it to our terminal.

How do notifications work push?

Now that we know how to distinguish between push and pull, we are going to analyze the entire journey of a WhatsApp message, from the moment it leaves a friend’s terminal until it reaches ours. Let’s go by points:

  1. The message comes out of our friend’s terminal, going to the WhatsApp server. That is your initial destination. The message carries the identification of the sender and the receiver, so that the server can classify it.
  2. The server receives the message and parses it. See where it comes from and to whom it is directed. If the recipient is available, the delivery process will begin, but it has not yet left for its destination. This is when our friend will see the first “check”.
  3. The server sends the message to the receiver and also notifies him that it is available to read. Here our friend will see the double “check”, but in gray. This means that the message has successfully reached its destination and that you have been notified of it. At this point we observe that there has not yet been any type of interaction on our part. We have not unlocked the application, or the phone, or anything. All this has been done without our having participated in the process.
  4. Finally, we are notified of the message, we consult WhatsApp and read it. Here our friend would see the double blue “check”, confirming that the recipient has received and read the message. We decide whether to answer or blatantly ignore our friend and the process starts again.

This is the magic of push notifications, notifying the user of something without their participation. That is why at the development level they are so important, because thanks to them we can communicate news about our services without having to wait for him to refresh the inbox or open the application. With Titanium it is possible to work with them since there is a specific function that takes care of this. In fact, I recommend reading more extensive information to learn how to use them.

Notes to keep in mind: Something that you should know is that, since the last regulation of Google’s conditions of use in Google Play (thinking about the year of publication of this post, 2015), we must not send advertising through push. It is illegal. It is totally prohibited and you could get your license to publish in the store withdrawn.

Did you know about this technology? Do you find it useful, or are you against its use, since sometimes the notifications can be very heavy? Let me know your opinions in the comments. As I always say, I will be delighted to read them.

Related course: Higher Course in Development of Mobile Applications.