Please Wait

Loading..

Push Notification

Get User's attention on your App by sending Push Notification on smart phones

Realtime messaging with Push Notification for your App

Push Notification

For send push notification on Android and IOS Phone you have to configured following steps in your dashboard.

  1. Enable Mobile push notification from your dashboard

    Javascript Security
  2. Fill FCM Key for Android Device and APNS Environment,PEM cert and PEM Private Key for IOS Device.

    Javascript Security
  3. To send IOS push notification you have registered devicetoken using IOS sdk from your app. For more information please refer the sdk documentation

  4. To send FCM based push notification you have to registered deviceToken and topic on FCM server. Topic must be like "clientKey_channel"


Web Push Notification

To subscribe Web Push Notification, below steps are supposed to follow in your dashboard.

  1. Enable Web push notification from your dashboard

    Javascript Security
  2. While enabling the feature a VAPID Public key will be accessible.

    Javascript Security
  3. To subscribe Web push notification you have to registered VAPID Public key with Channel. For more information please refer the sdk documentation

  4. You need service worker file also and its must be placed in a root directory of the application, If you don’t have than contact our support team


JSON format to send Mobile/Web Push Notification

Following JOSN format must be required to send push notification because yalgaar server identify the key and according to that send the notification to Android and IOS devices.

{"notification":
    {"apns":
        {"aps":
            {   
                "alert": "Hi from Yalgaar",
                "badge": 2,
                "sound": "melody"
            }
        },
        "fcm":
        {
            "body" : "Hi from Yalgaar"
        },
        "web":{ 
            "body":"Hi from Yalgaar",
            "icon":"http://www.yalgaar.io/images/yalgaaricon.png",
            "title":"Yalgaar Push Notification",
            "link":"https://www.yalgaar.io"
        }
    },
"message":"Hi from Yalgaar"
}

  • notification
    • Notification identify to send Mobile/Web Push Notification.
  • apns
    • apns key must contain for send APNS associated devices and it must begin with aps. In alert you can write the text which you want to send as notification.
  • fcm
    • fcm key must contain for send FCM associated devices. In fcm body you can write the text which you want to send as notification.
  • web
    • web key must contain for send on WEB browser. In web body you can write the text which you want to send as notification.
  • message
    • message key contain a text message which will send to subscribe channel.

Try another tutorials