Issue
I'm using the google android architecture component and I have a foreground service which is a LifeCycleService.
The problem is when i try to observe a LiveData from my repository, the observable onChanged doesn't trigger. If I use observeForever instead of observe it does trigger.
What could cause such a problem?
Solution
Turns out I was overriding the onBind without calling super.onBind which didn't trigger the LifeCycleService to be in a STARTED state. Which meant that my observer was always inactive
Answered By - Mono
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.