Skip to content

Instantly share code, notes, and snippets.

@ttuan
Last active June 12, 2017 03:15
Show Gist options
  • Save ttuan/fb7f3dc741043accd3a97f74f217c151 to your computer and use it in GitHub Desktop.
Save ttuan/fb7f3dc741043accd3a97f74f217c151 to your computer and use it in GitHub Desktop.

Notification Doc

Chat

When user receive a new message

When user1 sends a message to user2, user2 will receive a notification with format: iOS

{
  APNS: {
    aps: {
      alert: {
        body: first 40 characters in message's content. If message is
        file/location message, we'll send "You have new file/ location"
      },
      sound: "default"
    }
  },

  APNS_SANDBOX: Same content with APNS,

  category: "conversation",
  id: conversation_id,
}

Android:

{
  GCM: {
    notification: {
      text: first 40 characters in message's content. If message is
        file/location message, we'll send "You have new file/ location"
    }
  },

  category: "conversation",
  id: conversation_id,
}

Reservation

iOS

{
  APNS: {
    aps: {
      alert: {
        body: Notification's content
      },
      sound: "default"
    }
  },

  APNS_SANDBOX: Same content with APNS,

  category: "reservation",
  id: reservation_id,
}

Android:

{
  GCM: {
    notification: {
      text: Notification body
    }
  },

  category: "reservation",
  id: reservation_id,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment