-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
馃悰 Bug Report: Push notifications sent with FCM are missing fields for Android #8310
Comments
@MHEien, thanks for creating this issue! 馃檹馃徏 As mentioned on Discord, this seems like a bug either client-side or with react native. Here's my test on Android (Flutter) with the app in the foreground: the code i tested with: https://github.com/firebase/flutterfire/tree/master/packages/firebase_messaging/firebase_messaging/example |
Ok thanks, I've read up on how push notifications works on the device, and found that messages received while the app is in foreground is indeed controlled by the app. I suppose I'll have to wait for Expo to have this fixed then. However, if anybody else encounter this issue aswell, adding the title and message to |
This issue has been labeled as a 'question', indicating that it requires additional information from the requestor. It has been inactive for 7 days. If no further activity occurs, this issue will be closed in 14 days. |
馃憻 Reproduction steps
Send a message in Appwrite Console to an Android app.
Keep the app in foreground, and take a look at the received notification.
This is tested on Expo managed applications using the expo-notifications package.
馃憤 Expected behavior
I've been troubleshooting this for a bit, and found that the payload sent to FCM services is missing a data field in the object.
While taking a brief look through the UTOPIA PHP adapter used for messaging in Appwrite, specifically in the FCM class, I noticed this is indeed the case.
The class is found here: https://github.com/utopia-php/messaging/blob/main/src/Utopia/Messaging/Adapter/Push/FCM.php
Take a look at the bare example of the expected payload below, to see which fields are mapped to which Application state.
馃憥 Actual Behavior
When sending a Push notification to Android devices, the push notification is received, but will not contain any content while the app is in foreground. Including
android.data
will fix this.Discord thread: https://discord.com/channels/564160730845151244/1254059230751625217
馃幉 Appwrite version
Version 1.5.x
馃捇 Operating system
Linux
馃П Your Environment
1.5.5
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: