How push notifications work in TrueConf mobile apps
What is a push notification?
Overall, a push notification is a message sent to your device from a data distribution service. When an application is installed on a mobile OS, push notifications are used to send certain information about an event on the server, including the cases when the application is not used (minimized or unloaded from the device RAM).
Different services may be used for delivering push notifications depending on the application store from which the application was downloaded. In TrueConf applications, the following services are supported:
- FCM (Firebase Cloud Messaging) for the Google Play Store on Android;
- HMS Core (Huawei Mobile Services) for the Huawei AppGallery on Android;
- APNs (Apple Push Notification service) for the Apple App Store on iOS.
If multiple app stores are installed on the device, TrueConf application will use the posh notification service of the store from which it was downloaded.
Example of a push notification from TrueConf app:
Push notification mechanism
In TrueConf mobile applications, you will receive a push notification of incoming messages and mentions in a group chat, if notifications are not disabled in your settings.
Overall, TrueConf push notifications work in the following way:
- The device is registered on a push notification service depending on the app store from which TrueConf mobile app was downloaded.
- The push notification service issues a unique device token, This ID is needed for delivering notifications.
- When a message is sent by the initiating client, TrueConf Server contacts the TrueConf notification server at
reg.trueconf.com
. - The TrueConf notification server contacts the push notification service and sends the data listed below (the content can be customized by the administrator in the control panel of the video conferencing server):
- Sender’s name;
- Notification text;
- Name of a group chat/channel;
- Name of a video conference or incoming call;
- Preview of the attached image (if the size is less than 1 KB);
- Type of attachment (file/text message/geolocation).
- The push notification service verifies the token and forwards the notification to the client device which is supposed to receive the message.
- Even if the application is closed, the OS will display a pop-up message.
If you download and install TrueConf mobile app from our official download page, the push notification service will depend on the version of your APK file. Currently, TrueConf supports versions with Google Play and Huawei services.
Information in a push notification is sent over a secure HTTPS connection using a TLS certificate.
Depending on the push notification service, different TCP ports may be used for receiving such messages on a mobile OS. More details can be found in our article about ports.
In-app notifications
In addition to system push notifications, there are other notification methods supported by TrueConf client applications (in-app notifications).
The main differences from service (system) push notifications are as follows:
- In-app notifications are sent directly from a video conferencing server (TrueConf Server or TrueConf Enterprise) and do not depend on external services;
- In-app notifications work only if the application is active (used at the moment).
Such notifications work instantly, without delays, and do not depend on external services, but they are available only if the application is active (used at the moment).
Let us consider an example when there is no Internet connection between the mailing service and the TrueConf notification server. In this case, depending on the application state:
- If your TrueConf mobile application is minimized or unloaded from the device RAM, push notifications will not be received on the device;
- If your TrueConf mobile application is open, an in-app notification will be displayed.