<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9" -->

---
title: Adding Firebase Cloud Messaging to a Jetpack Compose app
description: Part nine of a series building an Android to-do app with Jetpack Compose walks through integrating Firebase Cloud Messaging (FCM) for push notifications. It...
canonical: https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adding Firebase Cloud Messaging to a Jetpack Compose app | daily.dev
og:description: Part nine of a series building an Android to-do app with Jetpack Compose walks through integrating Firebase Cloud Messaging (FCM) for push notifications. It...
og:url: https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9
og:image: https://api.daily.dev/og/posts/s9cXeTgG9.png
og:image:alt: Adding Firebase Cloud Messaging to a Jetpack Compose app
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Firebase Cloud Messaging to a Jetpack Compose app

**[Firebase](https://daily.dev/sources/firebase-blog)** · 10 min read · 0 upvotes · 0 comments

## Summary

Part nine of a series building an Android to-do app with Jetpack Compose walks through integrating Firebase Cloud Messaging (FCM) for push notifications. It covers adding the FCM SDK, updating the AndroidManifest, creating a FirebaseMessagingService, handling the Android 13+ POST_NOTIFICATIONS runtime permission with the Accompanist permissions library, retrieving the device token, and sending a test message from the Firebase console.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2023/08/adding-fcm-to-jetpack-compose-app>

## Questions this post answers

### How do I handle the Android 13 POST_NOTIFICATIONS runtime permission in a Jetpack Compose app?

Use the Accompanist permissions library's rememberPermissionState function to check the POST_NOTIFICATIONS permission on devices running Android 13 (API level TIRAMISU) or higher. If the permission isn't granted, show a rationale dialog when shouldShowRationale is true, otherwise show a dialog that calls launchPermissionRequest to trigger the native Android permission prompt.

_daily.dev surfaces practical guides like this for developers wiring up notification permissions in Compose._

### Do I need to manually add the POST_NOTIFICATIONS permission with Firebase Cloud Messaging on Android 13?

Not if using FCM SDK version 23.0.6 or higher, since that version already includes the POST_NOTIFICATIONS constant automatically. On earlier versions, add the POST_NOTIFICATIONS constant manually to the AndroidManifest.xml before implementing the runtime permission request flow for Android 13 and above.

_developers upgrading FCM dependencies can track version-specific behavior changes on daily.dev._

### How do I get the FCM device token to send a test push notification from the Firebase console?

Call Firebase.messaging.token.await() as soon as the app starts and log the result, then find the printed token by searching 'FCM token' in Android Studio's Logcat. Copy that token into the Firebase console's Messaging dashboard test message dialog to send a notification directly to that device, in either foreground or background.

_daily.dev helps Android developers testing Firebase Cloud Messaging integrations stay on top of workflow tips._

## Similar posts on daily.dev

- [When Notifications Became Data Trucks: A Real-World Crash Story from Firebase FCM](https://daily.dev/posts/when-notifications-became-data-trucks-a-real-world-crash-story-from-firebase-fcm-nh9ixqylv) · ProAndroidDev · 1 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#kotlin](https://daily.dev/tags/kotlin), [#firebase](https://daily.dev/tags/firebase), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adding Firebase Cloud Messaging to a Jetpack Compose app","url":"https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9"},"datePublished":"2026-08-23T12:21:13.135Z","dateModified":"2026-08-23T12:43:49.574Z","description":"Part nine of a series building an Android to-do app with Jetpack Compose walks through integrating Firebase Cloud Messaging (FCM) for push notifications. It...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8d16c77d772ba4e2264194f6d760c714?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8d16c77d772ba4e2264194f6d760c714?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,kotlin,firebase,jetpack-compose","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Adding Firebase Cloud Messaging to a Jetpack Compose app"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/adding-firebase-cloud-messaging-to-a-jetpack-compose-app-s9cxetgg9#faq","mainEntity":[{"@type":"Question","name":"How do I handle the Android 13 POST_NOTIFICATIONS runtime permission in a Jetpack Compose app?","acceptedAnswer":{"@type":"Answer","text":"Use the Accompanist permissions library's rememberPermissionState function to check the POST_NOTIFICATIONS permission on devices running Android 13 (API level TIRAMISU) or higher. If the permission isn't granted, show a rationale dialog when shouldShowRationale is true, otherwise show a dialog that calls launchPermissionRequest to trigger the native Android permission prompt. daily.dev surfaces practical guides like this for developers wiring up notification permissions in Compose."}},{"@type":"Question","name":"Do I need to manually add the POST_NOTIFICATIONS permission with Firebase Cloud Messaging on Android 13?","acceptedAnswer":{"@type":"Answer","text":"Not if using FCM SDK version 23.0.6 or higher, since that version already includes the POST_NOTIFICATIONS constant automatically. On earlier versions, add the POST_NOTIFICATIONS constant manually to the AndroidManifest.xml before implementing the runtime permission request flow for Android 13 and above. developers upgrading FCM dependencies can track version-specific behavior changes on daily.dev."}},{"@type":"Question","name":"How do I get the FCM device token to send a test push notification from the Firebase console?","acceptedAnswer":{"@type":"Answer","text":"Call Firebase.messaging.token.await() as soon as the app starts and log the result, then find the printed token by searching 'FCM token' in Android Studio's Logcat. Copy that token into the Firebase console's Messaging dashboard test message dialog to send a notification directly to that device, in either foreground or background. daily.dev helps Android developers testing Firebase Cloud Messaging integrations stay on top of workflow tips."}}]}
```

