Relative Content

Tag Archive for androidkotlinandroid-jetpack-compose

Manage Selected item Screen Navigation On Don’t Keep Activities (Process Death) Enabled

I’m using Jetpack Compose with NavController to manage navigation in my app. I have a screen where I want to clear the screen when seleted item is null immediately or restrict navigation or pop when user come back to screen after low memory pressure/ process death happens Also there is elcted item will be null becuase it viewmdoel is recreated due to process death but i could see the navigation is still in stack i dont want to naviate that screen. How to deal that?

Room Database is very slow For query 20 results with limit in 25k records

@Entity(tableName = “messages”, indices = [ Index(value = [“id”]), Index(value = [“reply_id”]), // Index for faster querying on reply_id Index(value = [“chat_id”]) ]) @TypeConverters(MessageConverters::class) // Add this line data class Message( @ColumnInfo(name = “chat_id”) val chatId: Int, @ColumnInfo(name = “sender_id”) val senderId: Long, @ColumnInfo(name = “recipient_id”) val recipientId: Long, @ColumnInfo(name = “sender_message_id”) val senderMessageId: Long, […]