title: How to handle Activity.onActivityResult() with Jetpack Compose?
body: <p>I am trying to implement <a href="https://developers.google.com/identity/smartlock-passwords/android/retrieve-hints" rel="noreferrer">sign-in hints</a> in my Android app using Jetpack Compose, but this API requires an <code>Activity</code> to work.</p>
  <pre><code>fun showPhoneNumberHint(activity: Activity) {
      val hintRequest: HintRequest = HintRequest.Builder()
          .setPhoneNumberIdentifierSupported(true)
          .build()
  
      val intent = Auth.CredentialsApi.getHintPickerIntent(apiClient, hintRequest)
      val requestCode = 12345
  
      try {
          startIntentSenderForResult(activity, intent.intentSender, requestCode, null, 0, 0, 0, null)
      } catch (exception: SendIntentException) {
          // Error handling
      }
  }
  </code></pre>
  <p>So I guess that I'll have to pass the Activity object all the way down to the Composable where it's needed, which doesn't seem very clean but it should work.</p>
  <p>But now the result of the hint will be received in the Activity's <code>onActivityResult()</code> and I'm not sure what the right way is to get it back to the Composable where it's needed.</p>
  <p>Is there some clean/standard/alternative way to do this? Preferably I'd just keep all of this logic contained inside the Composable.</p>