What is a Push notification?
Push notification is a message sent by the server to a mobile device. They can be either service messages (for example, notifications about the configuration update) or application messages (chat messages).
Since the mobile device cannot operate in server mode (await for incoming messages) due to security reasons and wireless carrier restrictions, Push messages can be delivered to the device either through an opened TCP channel or via periodic polling of the server. Both methods have their advantages and drawbacks.
Drawbacks of the polling method are excess traffic consumption and delivery delays. Translation of messages through the TCP channel requires proper processing of errors and connection faults and restoring the connection in a short time.
Independent system of Push notifications
Firebase Cloud Messaging (FCM) (earlier Google Cloud Messaging, GCM) is the main (and actually the only) provider of Push notifications for Android devices. Despite its advantages such as reliability and security, this is a cloud service requiring Google account to operate. Also, FCM may not work on the mobile devices and Android OS builds which are not certified by Google.
Our users require that Headwind MDM must be totally independent of any cloud services and could operate on the company’s servers even in LAN. Therefore, we have designed an independent system for Push notification delivery based on the MQTT protocol. As a message broker, we used the embedded broker ActiveMQ.
MQTT-based Push notifications are available in Headwind MDM launcher 3.01 and above. Older versions of the platforms provide Push notifications based on the server polling (there may be a delivery delay up to 15 minutes).
Push notification settings include delivery strategy preferences – the user may choose between battery economy and instant delivery in sleeping mode. Also, the delivery method can be chosen – the user may choose between MQTT and polling.
The Push notification platform independent of Firebase Cloud Messaging (FCM) can be used in LAN networks, and installed on uncertified Android devices and special Android OS builds such as GrapheneOS.
Using Push notifications in your apps
There is a developer’s guide how to integrate Headwind MDM’s Push notification platform into your applications.