title: Android : start screen capture without creating new activity
body: <p><br>I am trying to record screen video using MediaProjection. I want to capture video in the same activity and not start another activity.<br><br> I have gone through a few tutorials. In these tutorials, a call is made to startActivityForResult with <code>createScreenCaptureIntent()</code> as the first argument, which basically asks for permissions and starts the screen capture. And the <code>resultCode</code> is passed to <code>getMediaProjection()</code></p>
  
  <pre><code>startActivityForResult(mProjectionManager.createScreenCaptureIntent(), REQUEST_CODE);
  </code></pre>
  
  <p>It is necessary that the main activity is captured, so just frame replacement instead of a new activity. I have a floating button in the main activity, listening to stop recording.
  <br><br>So, I wanted to know if it is possible? Or if we can create a similar scenario leading to same events, wihtout creating a new activity of course? Or If this is not possible, how can we stop recording given that we are now in a new activity.
  <br>Thank you for your time.</p>