-
Notifications
You must be signed in to change notification settings - Fork 428
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
Data Message can't receive #39
Comments
The details of the expected behavior are here
If you want to customize what happens in the notification when the app Does this clarify the behavior you're seeing? Are you able to reproduce the errant behavior with our sample application? Cheers, |
I guess there is no more feedback since my last reply, I hope it's working for you. Please reopen if you still have issues. |
I am having the same issue.
But the PROBLEM WITH THIS is that i have to click on the notification to get the OnMessageReceived function called.
$json_dataMessage = '{ "data": { $ch = curl_init(); $output = curl_exec($ch);
"Note: If you want to send messages consisting of only custom key-values to an iOS device when the app is in the background, set custom key-value pairs in the data key and set content_available to true." so i added the content_available:true so that my jSON now looks like this: $json_dataMessage = '{ "data": { And i received the Data Message BUT ONLY when my app was in foreground (visible on screen).
Please help in this regard on how can i achieve this functionality. Thank-you. |
@muneebattamindravel the behavior of data messages differs between Android and iOS For Android details see On iOS when an app is in the background (it's really not running) messages are received via APNS in which case data will only be received by the application when / if the message is clicked and the message is routed to the app when it starts running again. |
Okay, thanks.
…On Wed, Aug 23, 2017 at 11:42 PM, Stewart Miles ***@***.***> wrote:
@muneebattamindravel <https://github.com/muneebattamindravel> the
behavior of data messages differs between Android and iOS
For Android details see
https://firebase.google.com/docs/cloud-messaging/android/receive
When messages are received in the background, if the application's message
receive service is running it's possible to perform an action in response
to a message. We have this documented in the C guide (the Unity SDK is
built on top of the C SDK) https://firebase.google.com/
docs/cloud-messaging/cpp/client#custom_message_handling_on_android
On iOS when an app is in the background (it's really not running) messages
are received via APNS in which case data will only be received by the
application when / if the message is clicked and the message is routed to
the app when it starts running again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Add5gOEpHN5J-PCbj7dJJAuohuHewYwCks5sbHKNgaJpZM4Lhvnu>
.
|
Unity 5.4.4f1
SO-02E Android 4.4.2
I have built quickstart project and can receive Notification correctly.
But Data Messages sent from PHP can't receive.
Same message is returned for both Data Message and Notification in echo.
(Even Data Message returns "success":1 )
{"multicast_id":~~~,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"~~~"}]}
But on device,
Notification : Messages appear in the notification list.
Data Message : Messages are not displayed anywhere.
By the way, when sending by inputting detailed options from Firebase Console,
messages appear in the notification list.
I think there is a problem with the data setting method, but I do not know where it is.
Could you just tell us what you think is the cause?
The text was updated successfully, but these errors were encountered: