Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat mengirim pesan notifikasi menggunakan
Notifications Composer di Firebase console. Meskipun tanpa
fleksibilitas atau skalabilitas yang sama seperti pengiriman pesan dengan
Admin SDK atau
protokol HTTP v1, Notifications Composer bisa
sangat berguna untuk pengujian atau pemasaran dan engagement pengguna yang ditargetkan secara khusus.
Firebase console menyediakan pengujian A/B
berbasis analisis untuk membantu meningkatkan
kualitas pesan pemasaran.
Setelah mengembangkan logika penerimaan pesan di aplikasi, Anda dapat mengizinkan pengguna non-teknis untuk mengirim pesan dengan Notifications Composer.
Tentang
Saat Anda mengirim pesan notifikasi dari Notifications Composer, Google menggunakan nilai yang dimasukkan dalam kolom formulir dengan cara berikut:
Kolom seperti User segment dan Expires menentukan opsi target dan pengiriman pesan.
Kolom seperti Notification text dan Custom data dikirim ke klien dalam payload yang terdiri dari key-value pair.
Kolom ini dipetakan ke kunci yang tersedia melalui objek
Message. Misalnya, key-value pair yang dimasukkan ke dalam kolom Custom data
dalam Composer ditangani sebagai payload
data untuk notifikasi tersebut. Kolom lain langsung dipetakan ke kunci di objek notification atau dalam konfigurasi notifikasi khusus platform.
Perlu diperhatikan bahwa beberapa kolom di
Notifications composertidak tersedia melalui FCM API. Misalnya, Anda dapat menarget segmen pengguna berdasarkan versi aplikasi, bahasa, jenis dan versi browser, atau properti pengguna dengan cara yang tidak tersedia menggunakan API server.
Kunci yang dikirim Firebase console ke klien adalah:
Kunci
Label kolom console
Deskripsi
notification.title
Judul notifikasi
Menunjukkan judul notifikasi.
notification.body
Teks notifikasi
Menunjukkan teks isi notifikasi.
data
Data kustom
Key-value pair yang Anda tetapkan. Key-value pair disampaikan sebagai payload data untuk ditangani aplikasi.
Kunci yang menentukan pengiriman pesan meliputi:
Kunci
Label kolom console
Deskripsi
sound
Suara
Menunjukkan suara yang akan diputar ketika perangkat menerima notifikasi.
time_to_live
Expires
Parameter ini menetapkan berapa lama (dalam detik) pesan harus disimpan dalam penyimpanan FCM jika perangkat sedang offline.
Untuk informasi lebih lanjut, lihat Menetapkan masa aktif pesan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-31 UTC."],[],[],null,["You can send notification messages using\n[the Notifications composer](//console.firebase.google.com/project/_/notification) in the Firebase console. Though this does not\nprovide the same flexibility or scalability as sending messages with the\n[Admin SDK](/docs/cloud-messaging/admin) or the\n[v1 HTTP protocol](/docs/reference/fcm/rest), it can be\nvery useful for testing or for highly targeted marketing and user engagement.\nThe Firebase console provides analytics-based\n[A/B testing](/docs/ab-testing/abtest-with-console) to help refine and\nimprove marketing messages.\n\nAfter you have developed logic in your app to receive messages, you can allow\nnon-technical users to send messages with\n[the Notifications composer](//console.firebase.google.com/project/_/notification).\n\nAbout\n\nWhen you send a notification message from\n[the Notifications composer](//console.firebase.google.com/project/_/notification),\nGoogle uses the values you enter in the form fields in these ways:\n\n- Fields like **User segment** and **Expires** determine the message target and delivery options.\n- Fields like **Notification text** and **Custom data** are sent to the client in a payload comprised of key/value pairs.\n\nThese fields map to keys available through the\n[`Message`](/docs/reference/fcm/rest/v1/projects.messages#resource:-message)\nobject. For example, key/value pairs entered in the **Custom data**\nfield of the composer are handled as a\n[`data`](/docs/reference/fcm/rest/v1/projects.messages#Message.FIELDS.data)\npayload for the notification. Other fields map directly to keys in the\n[`notification`](/docs/reference/fcm/rest/v1/projects.messages#notification)\nobject or in the platform specific notification configuration.\n\nNote that some fields in\n[the Notifications composer](//console.firebase.google.com/project/_/notification) are *not* available through\nthe FCM API. For example, you can target user segments\nbased on app version, language, browser type and version, or user properties\nin ways that are not available using the server API.\n| **Caution:** In another important difference from programmatic messaging, the console lets you cancel any scheduled message that is not already in progress. **Once\n| a message fanout is actually in progress, it is fully committed and\n| cannot be canceled through the console nor by Firebase support.**\n\nThe keys that the Firebase console sends to clients are:\n\n| Key | Console field label | Description |\n|----------------------|---------------------|-----------------------------------------------------------------------------------------------|\n| `notification.title` | Notification title | Indicates notification title. |\n| `notification.body` | Notification text | Indicates notification body text. |\n| `data` | Custom data | Key/value pairs that you define. These are delivered as a data payload for the app to handle. |\n\nKeys that determine message delivery include:\n\n| Key | Console field label | Description |\n|----------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sound` | Sound | Indicates a sound to play when the device receives a notification. |\n| `time_to_live` | Expires | This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. For more information, see [Setting the lifespan of a message](/docs/cloud-messaging/concept-options#ttl). |"]]