Hi everyone, I am working on a project where clean...
# android
a
Hi everyone, I am working on a project where clean architecture is implemented. We have 3 modules app(android library), domain(java-library) , data(java-lib) . I am refactoring it to follow mvvm + livedata and retrofit in kotlin. Now domain and data being (java-lib), I can not use androidx libs (thats what i read). every sample codes i have gone through for mvvm+livedata+retrofit there is only one module i.e. app/presentation (android-lib). Can someone direct me to show how I can implement similar architecture having java modules in my project?
a
You can't access
ViewModel
or
LiveData
in a java module. If you want to use
ViewModel
, you can create another android module. For
LiveData
, you should definitely check out
StateFlow
as it's better than
LiveData
almost in every way.
a
thanks ...will look into it