Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
63 views

I'm facing a strange issue that only occurs in the release build of my Android app (signed and uploaded to Google Play). In debug mode, everything works perfectly. After publishing or installing the ...
Richard Krammer's user avatar
0 votes
1 answer
130 views

I have a RecylcerView List of CardViews. Each CardView holds user data that is saved in a Room database. Some of the CardViews have due dates that have been entered by the user with a TimePicker. I ...
AJW's user avatar
  • 1,587
1 vote
1 answer
43 views

the logic i wish to implement is that i'm current at my MagicLinkScreen where user enter email, if email is valid it forward user to another screen that open mails app. Now when i navigate back from ...
Fatima Jamal's user avatar
3 votes
2 answers
102 views

I am using the same view model/composable pair for a creation form and an edit form. In the creation form, the text input starts as empty, but in the edit form, the initial text input comes from the ...
Eva's user avatar
  • 4,950
0 votes
0 answers
89 views

I'm migrating my app to the new Navigation 3 library. Some of my screens are still partially implemented using Fragments. In these Fragments, I want to use a NavEntry-scoped ViewModel, so that the ...
devha's user avatar
  • 3,407
3 votes
1 answer
424 views

I'm trying out the new Navigation 3 library for Jetpack Compose, and I'm a little stuck with how to pass parameters to Hilt view models. In Navigation 2, I could just pass route arguments straight to ...
sasetz's user avatar
  • 40
2 votes
1 answer
47 views

I am developing an Android application for a university project that simulates a supermarket e-shop. The app interfaces with the REST API of the products database using Retrofit2 and Moshi, with the ...
able_wig's user avatar
0 votes
0 answers
37 views

I have defined the following repository in a Koin module which requires a parameter: factory<AdRepository> { params -> DefaultAdRepository( inputAdId = params.get(), ...
Grzegorz Adam Hankiewicz's user avatar
1 vote
1 answer
501 views

For the moment I use this approach in my ViewModel: private val _email = MutableStateFlow("") val email: StateFlow<String> = _email.asStateFlow() fun updateEmail(email: String) { ...
Always Learner's user avatar
0 votes
1 answer
88 views

So, i have a composable, a viewmodel and a repository. I am fetching data from Firebase's Firestore, and it already has some documents in the collection i am fetching from. These are the snippets of: ...
Avdhoot Gole's user avatar
1 vote
2 answers
63 views

I want to modify my Android ViewModel code, which currently uses LiveData, so that the LiveData objects are cleared or reset after they have been consumed by the UI. This is to prevent the UI from re-...
Kian Mahmoudi's user avatar
0 votes
1 answer
52 views

If you have code in your ViewModel that needs to check a viewModel's stateFlow and also needs to update it, and you want to extract this code into a separate class because it is already too much code, ...
David's user avatar
  • 4,889
1 vote
1 answer
116 views

I am implementing a weather app using Jetpack Compose. It includes a function to choose the temperature unit (Celsius or Fahrenheit). Whenever the temperature unit is changed, the data should refresh. ...
Gnua Aruht's user avatar
1 vote
2 answers
55 views

In my ViewModel, I have set up a propery like this: class MyViewModel(private val savedStateHandle: SavedStateHandle) : ViewModel() { private var _wrongNumbers: ArrayList<Int> = ...
BenjyTec's user avatar
  • 12.6k
-1 votes
1 answer
70 views

I’m developing an application in Jetpack Compose with a main file App.kt that handles navigation and contains a lower bar (BottomBar) that allows navigation and triggers other shared actions across ...
NullPointerException's user avatar
2 votes
0 answers
80 views

I’m developing a water-tracking app where a setting like volumeUnit (mL/L) needs to be accessible across almost all screens. I’ve implemented a SettingsManager (using DataStore) and a ...
tereshkevich's user avatar
4 votes
1 answer
270 views

I've read through a couple of developer.android.com articles trying to understand how to structure UI with elements, states, events, and so on, but I don't really get how to implement it exactly. I've ...
Jan Thürmann's user avatar
1 vote
1 answer
233 views

I am working on an app that has a typical list and detail view. When I enter data into the detail form and save, the list doesn't refresh to include the new item. Here's some code to show what I'm ...
Code-Apprentice's user avatar
0 votes
1 answer
604 views

Following Android documentation from various places: Use Hilt with other Jetpack libraries: Inject ViewModel objects with Hilt Compose and other libraries: ViewModel Compose and other libraries: Hilt ...
TenHorizons's user avatar
0 votes
3 answers
427 views

I'm working on a project where an Android app connects to a Ktor server via Server-Sent Events (SSE). The server is supposed to continuously send updates whenever new data is emitted from the Arduino ...
Ali Othman's user avatar
0 votes
1 answer
139 views

I have a fragment HomeFragment which is part of the app navigation graph. Within FragmentHome I have a viewpager with 3 fragment instances of same class ChildFragment. Each ChildFragment requires an ...
rdias002's user avatar
  • 234
1 vote
3 answers
1k views

I am working on a Kotlin Multiplatform (KMP) project, and I am facing an issue where a method in my ViewModel is not being called when I trigger it from a Compose screen. My ViewModel is located in ...
Morozov's user avatar
  • 5,290
4 votes
1 answer
84 views

If I have multiple parameters that I am getting from the repository which is getting it from a datastore. How should I properly initialize them? This is my current approach: @HiltViewModel class ...
Aditya Anand's user avatar
4 votes
2 answers
537 views

I have a nested component structure in Jetpack Compose where a deeply nested component needs to interact with a ViewModel. I'm trying to determine the best approach for handling this interaction. Here'...
Pawandeep Singh's user avatar
1 vote
1 answer
83 views

I've made a form in which I can create or edit cards. I'm using Kotlin + Jetpack Compose + Dagger Hilt + Room. It works OK, except for one thing. When I turn the screen without saving the record, I ...
forvas's user avatar
  • 10.3k

1
2 3 4 5
38