title: getting back a result from LauncherForActivityResult
body: <p>I'm a bit stuck in a function I'm writing.</p>
  <p>I have a function that calls another app I wrote and needs to return a Boolean</p>
  <pre><code>@Composable
  fun callApp(
      //someparams
  ) : Boolean {
        //some code
  }
  </code></pre>
  <p>after some logic, i launch my application via:</p>
  <pre><code>val startForResult =
          rememberLauncherForActivityResult(ActivityResultContracts.StartActivityForResult()) { result: ActivityResult -&gt;
              if (result.resultCode == Activity.RESULT_OK) {
                 //here i need to set the return value of &quot;callApp&quot;
              }}
  </code></pre>
  <p>And trigger it by</p>
  <pre><code>startForResult.launch(launchIntent)
  </code></pre>
  <p>The problem is that i can't see a way in which i can return the boolean generated in the result by the function &quot;callApp&quot;.
  Note that i can't use sharedPref/realm/any data structure external from code itself.</p>
  <p>Can you help me understand this?</p>