Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

fix: android missing channelId warning should now show#1995

Merged
Dallas62 merged 1 commit into
zo0r:masterfrom
gioragutt:patch-1
May 12, 2021
Merged

fix: android missing channelId warning should now show#1995
Dallas62 merged 1 commit into
zo0r:masterfrom
gioragutt:patch-1

Conversation

@gioragutt
Copy link
Copy Markdown
Contributor

Small one, would have been caught by TypeScript easily 🤷🏻‍♂️

Small one, would have been caught by TypeScript easily 🤷🏻‍♂️
@Dallas62 Dallas62 merged commit 7315f43 into zo0r:master May 12, 2021
@Dallas62
Copy link
Copy Markdown
Collaborator

Thanks !

@Dallas62
Copy link
Copy Markdown
Collaborator

Will release it ASAP

@wadhia-yash
Copy link
Copy Markdown

Hi @darryl-tan this warning is usually given in android as referring to create a channel for triggering the notification. As of Android O, creating a Notification instance requires a channel ID. This is to ensure that our notification belongs to a channel that can be managed by the user from their device settings. And as of solution for your problem is this:

const showNotification = (title, message, channelId, channelName) => {
  PushNotification.createChannel({
            channelId,
            channelName,
        });

  PushNotification.localNotification({
          channelId,
          title:title,
          message:message,
        });
}

@gioragutt gioragutt deleted the patch-1 branch June 6, 2021 08:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants