title: Error while observing MutableLiveData
body: <p>I'm working on a MVVM app. I've been able to use AndroidViewModel, Activity and MutableLiveData together, but I don't know why am I having problem with this specific method.</p>
  
  <p>For example, I've an AndroidViewModel Called "IssuesViewModel". It has a <code>private MutableLiveData&lt;Boolean&gt; mutable;</code> and this two methods:   </p>
  
  <pre><code>// Retrofit 2 call
  public void reportIssue(Data data){
      mutable = new MutableLiveData();
      retrofit.reportIssue(Data data, new RestCallback&lt;Void&gt;(){
          @Override
          public void success(Void success){
              mutable.setValue(true);
          }
          @Override
          public void failure(){
              mutable.setValue(false);
          }
      );
  }
  
  // Getting mutableLiveData
  public MutableLiveData&lt;Boolean&gt; getMutable(){
      return mutable;
  }
  </code></pre>
  
  <p>Now, in my "IssuesActivity", that is extending <code>AppCompatActivity</code> and implementing <code>LifecycleRegistryOwner</code>, I have this methods:</p>
  
  <pre><code>//... Activity callbacks and other methods ...
  private IssuesViewModel viewModel;
  @Override
  protected void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState)
      // Toolbar code and other stuff...
      viewModel = ViewModelProviders.of(this).get(IssuesViewModel.class);
      // More code ...
  }
  
  @Override
  public LifecycleRegistry getLifecycle() {
      return new LifecycleRegistry(this);
  }
  
  // Triggered after button click
  private void reportIssue(Data data){
      viewModel.reportIssue(data);
      viewModel.getMutable().observe(this, new Observer&lt;Boolean&gt;(){
          @Override
          public void onChanged(@Nullable Boolean response){
              if (response != null &amp;&amp; response){
                  //Success, update UI
              } else {
                  //Error, update UI
              }
      }
  }
  </code></pre>
  
  <p>I've been able to use mutableLiveData before (with custom Object instead of Boolean). I did the same for all my previous calls... I don't know why this is not working.</p>
  
  <p>Thanks!</p>
  
  <p><strong>Edit 1, Nov 21th:</strong></p>
  
  <p>I think the problem is that my activity extends <code>AppCompatActivity</code> and implements <code>LifecycleRegistryOwner</code>. I have an Activity with similar code to the one above and everything works, but that Activity is extending <code>LifecycleActivity</code>. When I change this activity, extending <code>AppCompatActivity</code> and implementing<code>LifecycleRegistryOwner</code>, observer's onChange <strong>never triggers</strong>. I found this <a href="https://issuetracker.google.com/issues/62160522#comment1" rel="nofollow noreferrer">bug</a> that is related with my problem, but I think it just works with Fragments...</p>