Skip to content

🚀 Enhancement: Add support for push notification channels (Android/FCM) #8086

Closed

Description

@f1refliesss

🔖 Enhancement description

Enhance the capabilities of the Appwrite Messaging API by incorporating support for Android push notification channels in conjunction with Firebase Cloud Messaging (FCM).

🎤 Pitch

Currently, it's not possible to specify a notification channel ID when using Appwrite's Messaging feature and FCM. This means that all notifications currently end up in the same channel, which is not ideal. Notification channels allow Android users to specifically control which notifications they'd like to receive.

Referring to the documentation located at https://firebase.google.com/docs/cloud-messaging/http-server-ref, it is possible to specify the channel ID by passing the android_channel_id or channel_id parameter to the notification section, as demonstrated below:

{
   "to": "$device_token",
   "notification": {
      "title": "New Message",
      "body": "You have a new message!",
      "android_channel_id": "$channel_id", // For Android 8 and above
      "channel_id": "$channel_id", // For Android versions prior to 8
   },
   "data": {
      "message_id": "123456789",
      "sender_id": "user123",
      "message_text": "Hello, how are you?"
   },
   "priority": "normal"
}

Enhancing the createPush() method by adding parameters for android_channel_id and channel_id would enable the passing of a channel ID.

In my view, integrating support for push notification channels would greatly enhance the functionality of the Appwrite Messaging API.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added
    enhancement
    on May 7, 2024
  2. added
    product / messaging
    on May 8, 2024
  3. stnguyen90 commented on May 8, 2024

    @stnguyen90
    Contributor

    @f1refliesss, thanks for raising this! 🙏🏼 This makes a lot of sense.

  4. ucswift commented on Jan 17, 2025

    @ucswift

    Hey all,
    I see a lot of work going into the 1.6.x release dealing with messaging #9060 an wondering if this issue will be included as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementproduct / messaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions