İletiler, farklı türlerdeki gelen verileri temsil edebilir. En yaygın olarak, iletiler geliştirici tarafından başlatıldıktan sonra uygulamaya gönderilir. Mesaj gönderme etkinliklerini, mesaj gönderme hatası etkinliklerini ve silinen mesaj etkinliklerini temsil etmek için uygulamanıza da mesajlar gönderilir. Bu özel etkinlikler, MessageType alanı kontrol edilerek ayırt edilebilir.
Mesajlar Silindi
FCM sunucusu bekleyen iletileri sildiğinde uygulamanıza gönderilir.
MessageType, "deleted_messages" olacak. Aşağıdaki durumlarda iletiler silinebilir:
FCM sunucusunda çok fazla ileti depolanıyor.
Bu durum, bir uygulamanın sunucuları cihaz çevrimdışıyken FCM sunucularına daraltılamayan bir grup mesaj gönderdiğinde ortaya çıkabilir.
Cihaz uzun süredir bağlanmıyor ve uygulama sunucusu kısa süre önce (son 4 hafta içinde) bu cihazdaki uygulamaya mesaj gönderdi.
Uygulamanın bu aramayı aldıktan sonra uygulama sunucusuyla tam senkronizasyon yapması önerilir.
Etkinlik Gönder
Bir yukarı akış mesajı FCM adresine başarıyla gönderildiğinde çağrılır.
MessageType, "send_event" olacak.
Gönderme Hatası
Yukarı akış iletisi gönderilirken hata oluştuğunda çağrılır.
MessageType, "send_error" olacak.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-09-03 UTC."],[],[],null,["Receive and handle messages\n\nTo receive messages, your app must assign a callback to the\n[Firebase.Messaging.FirebaseMessaging.MessageReceived](/docs/reference/unity/class/firebase/messaging/firebase-messaging#messagereceived)\nevent handler.\n\n`MessageReceived` Event\n\nBy overriding assigning a callback to\n[Firebase.Messaging.FirebaseMessaging.MessageReceived](/docs/reference/unity/class/firebase/messaging/firebase-messaging#messagereceived)\nyou can perform actions based on the received message and get the message data: \n\n```c#\npublic void OnMessageReceived(object sender, Firebase.Messaging.MessageReceivedEventArgs e) {\n UnityEngine.Debug.Log(\"From: \" + e.Message.From);\n UnityEngine.Debug.Log(\"Message ID: \" + e.Message.MessageId);\n}\n```\n\nMessages can represent different kinds of incoming data. Most commonly,\nmessages are sent to the app after being initiated by the developer. Messages\nare also sent to you app to represent message sent events, message send error\nevents, and messages deleted events. These special events can be differentiated\nby checking the `MessageType` field.\n\nMessages Deleted\n\nSent to your app when the FCM server deletes pending messages.\n`MessageType` will be `\"deleted_messages\"`. Messages may be deleted if:\n\n1. Too many messages are stored on the FCM server.\n\n This can occur when an app's servers send a bunch of non-collapsible\n messages to FCM servers while the device is offline.\n2. The device hasn't connected in a long time and the app server has\n recently (within the last 4 weeks) sent a message to the app on that\n device.\n\n It is recommended that the app do a full sync with the app\n server after receiving this call.\n\nSend Event\n\nCalled when an upstream message has been successfully sent to FCM.\n`MessageType` will be `\"send_event\"`.\n\nSend Error\n\nCalled when there was an error sending an upstream message.\n`MessageType` will be `\"send_error\"`."]]