As a developer, in some cases, you need to send real-time notifications to users following events or actions according to your application logic. For example when a user sends a friend request to another user. The latter must receive an instant notification to approve or deny the request without waiting to refresh the page or re-open the Android application.
MQTT notifications should not be confused with WEB push notifications or android FCM notifications. MQTT notifications are sent using the socket connection established between the android application or the WEB browser and our MQTT server. No intermediary server is used.
An MQTT notification is made up of the following fields:
id of user that will receive the notification (mandatory)
Notification title (mandatory)
Notification content : text or html (mandatory)
Url of image or photo to show (optional)
JSON additional data for your application need (optional)
For example to send Notification using PHP SDK.
"content":"John Doe sent you a friend request",
You can get already sent notification content by id.
Last modified 1yr ago