Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
f1refliesss opened this issue May 7, 2024 · 1 comment
Open
2 tasks done
Labels
enhancement New feature or request product / messaging Fixes and upgrades for the Appwrite Messaging.

Comments

@f1refliesss
Copy link

馃敄 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?

@f1refliesss f1refliesss added the enhancement New feature or request label May 7, 2024
@stnguyen90 stnguyen90 added the product / messaging Fixes and upgrades for the Appwrite Messaging. label May 8, 2024
@stnguyen90
Copy link
Contributor

@f1refliesss, thanks for raising this! 馃檹馃徏 This makes a lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request product / messaging Fixes and upgrades for the Appwrite Messaging.
Projects
None yet
Development

No branches or pull requests

2 participants