title: How can I test In-app updates in Android?
body: <p>Recently, Google introduced 'in-app updates' in Google I/O 2019.</p>
  
  <p>So I am trying to use it.</p>
  
  <pre><code>val appUpdateManager = AppUpdateManagerFactory.create(this)
  val appUpdateInfo = appUpdateManager.appUpdateInfo
  appUpdateInfo.addOnCompleteListener {
      val result = it.result
      if (result.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE
              &amp;&amp; result.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)) {
  
          info("should show update")
          appUpdateManager.startUpdateFlowForResult(
                          result,
                          AppUpdateType.FLEXIBLE,
                          this,
                          1)
      } else {
          info("This is already latest version: ${result.updateAvailability()}")
      }
  }
  </code></pre>
  
  <p>But the <code>result.updateAvailability()</code> is always <code>UpdateAvailability.UPDATE_NOT_AVAILABLE</code>.</p>
  
  <p>To do this, I made a signed release apk with previous version code.
  But it doesn't work.</p>
  
  <p>According to the demo on the <a href="https://www.youtube.com/watch?v=LoLqSbV1ELU&amp;t=1115s" rel="noreferrer">Developer Keynote (16:40 ~ )</a></p>
  
  <p>He is doing it with the emulator.
  It looks like debug mode.</p>
  
  <p>How can I do this same thing?</p>