title: How to map a class field to LiveData
body: <p>I have a class which runs in the background and handles the business logic, and it contains state variable like so. The implementation of the <code>State</code> enum is inside the interface implemented by <code>Common</code> class.</p>
  <pre><code>class Mine extends Common {
      public State state;
  }
  </code></pre>
  <p>I have a view model which has one <code>LiveData</code> member to call the state of <code>Mine</code> class, <code>Mine</code> has been implemented with a Singleton pattern so I use <code>Mine.getInstance().state</code> to access state.</p>
  <pre><code>class MineViewModel : ViewModel() {
     val state: Flowable&lt;State&gt; = Flowable.fromCallable { return@fromCallable Mine.getInstance().state }
  
     private var _status : LiveData&lt;State&gt; = LiveDataReactiveStreams.fromPublisher(state)
     
     val status: LiveData&lt;State&gt;
        get() = _status
  }
  </code></pre>
  <p>I update my UI with the help of the Binding Adapter on <code>MineViewModel</code> and fragment. Right now, I'm unable to update the <code>_status</code> in the View Model. I get the first value which for the sake of argument here is <code>CREATED</code>. I'm not sure what I am missing.</p>