Current smartphones have more power than many computers from just a few years ago, and also have the fundamental characteristic that they are always connected to the Internet, either through 3G or WiFi. That makes them very suitable for all types of applications that consume information in real time (or "almost-real"), as well as the implementation of services that imply the consumption of very up-to-date information (news, notices, messages, etc ...).
For example, Windows Phone has 3 types of notifications : the "Toast" (Toast) that are informative messages that jump at any time, those of "Tiles" (Tile) that are displayed directly in the rectangles that represent your application in the cover, and the "raw" that are received directly in the application when it is running.
Battery problem
If you develop mobile applications and want to show the user real-time warnings and information dependent on external information, you have basically two theoretical ways of achieving it :
1. If the user is using your application you can show the notifications that you think are convenient, because you have their full attention. If the information is generated on the Internet (as usual) you can make periodic calls to an external service that returns the necessary information (for example, to show you the latest news or whatever you consume).
2. If your application is not being used, you could have a kind of service or “daemon” running on the phone that periodically checks, and if there is something to notify that shows a dialogue, update an information panel or directly launch your application.
3. The problem with the first strategy is that the user can not be using your application all the time, so you can not depend on this to show alerts, which by definition, can arrive at any time, when they are necessary.
The second strategy has a fundamental problem: no mobile operating system worth its salt will allow you to do something like that.
PUSH notification services
Since it is clear that phones allow it: how is it possible to achieve this functionality in one of our applications if we have the previous limitation? Well, all operating systems work in a similar way, and to achieve this they use a distributed architecture in which your phone, its service and a service that you must program have to work in harmony. This is what I will explain theoretically in this post.
Although each OS has its own characteristics, they all work in a similar way, so understanding this push notification architecture will help us work on any platform.
There are three pieces of the mechanism that must work together for the entire system to work: the terminal, a service we must program and a notification service provided by the manufacturer (Microsoft or Apple). The service itself will be responsible for launching notifications when necessary (we will have to program it, of course), using the manufacturer's service as an intermediary.
Hasan Root, a dream lover!
Post new comment
Please Register or Login to post new comment.