Skip to content

Notification Channel for Android O #258

Description

@mdgagne
  • Operating System version: Ubuntu 16.04
  • Firebase SDK version: 5.12
  • Library version: 5.12
  • Firebase Product: messaging

I want to send a push notification to a specific android notification channel, as described here:
https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels

Steps to reproduce:

Error: Invalid JSON payload received. Unknown name "android_channel_id" when calling admin.messaging ().send () with the following payload

let pushMessage = {
    notification: {
      title: title,
      body: body,
    },
    android: {
      "notification": {
        "title": title,
        "body": body,
        "sound": "mysound",
        "tag": "alerts",
        "icon": "myicon",
        "android_channel_id": "myalertchannel",
      }
    }

I've tried putting android_channel_id in several different objects of the payload and received the same error. I know that channels are supported because you can set the channel in the firebase console and I've confirmed my phone receive the notification. Am I missing something?

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions