title: RXJava "Single<Long> insert" only insert correctly before the activity is finished ( finish() )
body: <p>I having some trouble using RXJava with Room. I trying to insert some data and after the insert (onSucess) call <code>finish()</code> to close the activity.</p>
  <p>Everything is okay if I don't call <code>finish()</code> on the activity, I insert how much data I want, the ids returned are right (1, 2, 3, 4...) and data are displayed on table. If a call <code>finish()</code> and open the activity again, <code>onSucess(Long aLong)</code> only returns id 1 and the table is not uptaded anymore.</p>
  <p>There is the code:</p>
  <pre class="lang-java prettyprint-override"><code>Client client = new Client();
  client.birth_date = birthDate.toString();
  client.health_status = healthStatus;
  client.lives_with = livesWith;
  client.name = name;
  client.school_time = schoolTime;
  
  singleObserver = database().clientDAO().insert(client);
  singleObserver.subscribeOn(Schedulers.computation())
      .observeOn(AndroidSchedulers.mainThread())
      .subscribe(new DisposableSingleObserver&lt;Long&gt;() {
          @Override
          public void onSuccess(Long aLong) {
              String formated = String.format(getApplication().getString(R.string.new_client_register), client.name);
              Toast toast = Toast.makeText(getApplication(), formated, Toast.LENGTH_SHORT);
              toast.show();
              finish();
          }
  
          @Override
          public void onError(Throwable e) {
  
          }
  });
  </code></pre>
  <p>In DAO I just declare:</p>
  <pre class="lang-java prettyprint-override"><code>@Insert
  Single&lt;Long&gt; insert(Client client);
  </code></pre>
  <p>I'm stuck in that for 2 days, and I don't find out what I'm doing wrong. And the question is, why <code>Single</code> behaviour is different after I finish the activity. I have tried to unsubscribe and searched somehow to destroy the variable attached to it, but the behaviour still the same.</p>
  <p>Someone can help me?</p>