-
Notifications
You must be signed in to change notification settings - Fork 32
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Notification channel id #29
Comments
Hi @rayansys Could you provide a bit more info please? Perhaps some detail on what you're trying to do and where you hit this issue. Fireball cloud messaging doesn't really have channels, but topics instead. Topics are fully supported by php-fcm. More info... https://firebase.google.com/docs/cloud-messaging/android/topic-messaging https://php-fcm.readthedocs.io/en/latest/message.html#notification-message-topics Sorry if I've misunderstood the issue. |
The notification's channel id (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest. |
Thanks for the quick reply. The php-fcm library just really wraps functionality in provided by firebase cloud messaging. If you can point us to the fcm docs about channels, that'd be handy. Previously I've used other messaging systems that used the term channels, like Appcelerator ACS. It was my understanding that the concept channels is kind of implemented as topics now in FCM, but I'm not really sure. |
@AndyGaskell @rayansys - yeah, I don't understand the request. TopicIDs are managed by php-fcm. Can you point us to some documentation about what you are referring to please? |
Thanks for the link. I'll do some reading on that. I guess we've not implemented it because it's Android only. |
@AndyGaskell - I did a quick read, it looks like https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels |
just add "android_channel_id" to request header |
Cool, am understanding it a bit more now. Thanks for the notes @rolinger I guess we've only ever implemented the cross platform features of FCM, we could do the platform specific ones too. So, looking at https://firebase.google.com/docs/reference/fcm/rest/v1/projects.message we could add other functions to add android, webpush and apns. This could maybe be done in the same way as the addData, so we'd have Another option, which would be much quicker, would be to just add another parameter to the Notification constructor for the channel. Then, I guess, add a setChannel function. If we did it this way it'd just work in the same way as sounds, icon, colour etc. It'd be a bit of a mess if we wanted to add other platform specific options though. One thing I'm a bit worried about is how we'd test all this, at a system level. Also @rayansys I'm a bit confused about how you mention adding it to the header. From the docs it looks like it goes in the json body. |
This functionality would be really nice to have, @AndyGaskell will you only accept a design similar to what you described in your previous comment regarding addAndroidConfig(), addApnsConfig()? |
add this header & functions
The text was updated successfully, but these errors were encountered: