---
title: "Discussion on \"Compose MVVM RoomDB with Flow and DI\" | Hashnode"
description: "Discussion on \"Compose MVVM RoomDB with Flow and DI\". A Clean Architecture Guide for Building Modern Android Apps"
url: "https://hashnode.com/posts/compose-mvvm-roomdb-with-flow-and-di/65775000384e70d70d28ee8a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Compose MVVM RoomDB with Flow and DI](https://saurabhjadhavblogs.com/compose-mvvm-roomdb-with-flow-and-di?utm_source=hashnode&utm_medium=feed)

A Clean Architecture Guide for Building Modern Android Apps

Dec 11, 2023 · 13 min read · saurabhjadhavblogs.com  
Read the article

-   [#roomdb](https://hashnode.com/tag/roomdb)
-   [#compose](https://hashnode.com/tag/compose)
-   [#jetpack-compose](https://hashnode.com/tag/jetpack-compose)
-   [#flow](https://hashnode.com/tag/flow)
-   [#mvvm](https://hashnode.com/tag/mvvm)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)
-   [#android-app-development](https://hashnode.com/tag/android-app-development)

## Written by

[saurabh jadhav](https://hashnode.com/@saurabhjadhav)

@saurabhjadhav

  
[View profile](https://hashnode.com/@saurabhjadhav)

Android and AI developer

## Responses

Markdown supported · ⌘↵ to post

[Fermín](https://hashnode.com/@FerSan)

[Apr 29, 2024](https://hashnode.com/posts/compose-mvvm-roomdb-with-flow-and-di/65775000384e70d70d28ee8a/comment/662f7927f889238c52084a89)

Hello, a very good article, I am trying to implement a "FirebaseMessagingService" with this code, but I cannot update the list of items in "ItemListScreen", I added this code when receiving a message: var appdatabase = AppModule.provideAppDatabase(applicationContext) var itemDao: ItemDao = AppModule.provideItemDao(appdatabase) var itemRepository: ItemRepository = AppModule.provideItemRepository(itemDao) itemRepository.insert(Item(name = "test"))

but it doesn't work, could you tell me where I'm going wrong? Thank you so much.
