title: Intent Mediastore.ACTION_VIDEO_CAPTURE refuse putExtra arguments
body: <pre class="lang-java prettyprint-override"><code>final File root = new File(Environment.getExternalStorageDirectory() + File.separator + &quot;MyDir&quot; + File.separator);
  root.mkdirs();
  final String fname = &quot;img_&quot;+ System.currentTimeMillis() + &quot;.mp4&quot;;
  final File sdImageMainDirectory = new File(root, fname);
  Uri mImageUri = Uri.fromFile(sdImageMainDirectory);
  final Intent takeVideoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
  takeVideoIntent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 30);
  takeVideoIntent.putExtra(MediaStore.EXTRA_OUTPUT, mImageUri.toString());
  if(takeVideoIntent.resolveActivity(getPackageManager()) != null) {
    activityResultLauncher.launch(takeVideoIntent); 
  }
  </code></pre>
  <p>The logs says that:</p>
  <pre class="lang-none prettyprint-override"><code>W/Bundle: Key output expected Parcelable but value was a java.lang.String.  The default value &lt;null&gt; was returned.
  W/Bundle: Attempt to cast generated internal exception:
      java.lang.ClassCastException: java.lang.String cannot be cast to android.os.Parcelable
          at android.os.Bundle.getParcelable(Bundle.java:1008)
          at android.content.Intent.getParcelableExtra(Intent.java:8524)
          at android.content.Intent.migrateExtraStreamToClipData(Intent.java:11656)
          at android.app.Instrumentation.execStartActivity(Instrumentation.java:1741)
          at android.app.Activity.startActivityForResult(Activity.java:5404)
          at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:584)
          at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:234)
          at androidx.activity.ComponentActivity$2.onLaunch(ComponentActivity.java:218)
          at androidx.activity.result.ActivityResultRegistry$2.launch(ActivityResultRegistry.java:162)
          at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.java:47)
          at com2.data.bbstar.PostActivity$3.onClick(PostActivity.java:479)
          at android.view.View.performClick(View.java:7441)
          at android.view.View.performClickInternal(View.java:7418)
          at android.view.View.access$3700(View.java:835)
          at android.view.View$PerformClick.run(View.java:28675)
          at android.os.Handler.handleCallback(Handler.java:938)
          at android.os.Handler.dispatchMessage(Handler.java:99)
          at android.os.Looper.loopOnce(Looper.java:201)
          at android.os.Looper.loop(Looper.java:288)
          at android.app.ActivityThread.main(ActivityThread.java:7829)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:982)
  </code></pre>
  <p>When I click to record, the activity close directly.
  When I don't putExtra, the activity works but I can't use the video (logs says that the video doesn't exist).</p>