This method displays the custom view when a user is sent a push notification.

There are various ways in which a Push Notification can be viewed: Standard and Extended.
Standard provides a heading and image only; Extended provides a preview of the content.

To add the method

  1. Open your project.
  2. Open the app.js file in the js folder. app.js
  3. Add the method code:
        {Notification Payload}


These are the arguments for the method.

  1. successCallback - The Success Callback function is called
  2. errorCallback - The Error Callback is called in case of an error, and contains an error message
  3. Notification Payload - The {Notification Payload}'s keys are listed below

Object Keys

Key Type Mandatory Description
Alert Dictionary or String Optional This is the title of the notification.
Sound String Optional This it the accompanying notification sound.
Message String Optional This it the text of the notification.
Id String Optional This is a unique identifier.

There is also a notification icon supplied.

Sample Code

        "alert": "joetheman",
        "sound": "default"
    "message": "Some custom message for your app",
    "id": 1234

results matching ""

    No results matching ""