Visual Studio Emulator for Android - Video Recording

I have a simple project that launches and runs on VS for an Android application, which is now just a study. I want to record short (boring) videos to document people doing assignments. Everything works fine for me. I have an Android SDK, I have an emulator, and I have a stock code that is everywhere on the Internet. I uploaded profiles to boot android machines. API 15,19,23 on kitkat, marshmellow, etc.

I have permissions for video, audio, external storage, etc. in the manifest.

I think I'm all goo, except that I donโ€™t have a stop button for the video.

I have a corresponding camera operation working as a pleasure.

private void TakeAPicture(object sender, EventArgs eventArgs) { Intent intent = new Intent(MediaStore.ActionImageCapture); App._file = new File(App._dir, String.Format("myPhoto_{0}.jpg", Guid.NewGuid())); intent.PutExtra(MediaStore.ExtraOutput, Android.Net.Uri.FromFile(App._file)); StartActivityForResult(intent, 0); } 

Then, when the camera button is pressed, everything collects the content well and saves it.

  protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) { base.OnActivityResult(requestCode, resultCode, data); if (resultCode != Result.Ok) { // did not do what we wanted return; } 

blah blah blah.

My problem is that when I use some kind of emulator and click on the video version, the video starts but never stops. In the end, the time runs out, and I get the message โ€œwait or killโ€ the android, and when I kill it, it gets into OnActivityResult with the resultCode canceled (which is good)

Should I expect the video in the emulator to work. I use the mocked video of a red / green window bouncing around.

here is my code that starts with the standard button

  private void TakeAVideo(object sender, EventArgs eventArgs) { Intent intent = new Intent(MediaStore.ActionVideoCapture); App._file = new File(App._dir, String.Format("myVideo_{0}.mp4", Guid.NewGuid())); intent.PutExtra(MediaStore.ExtraOutput, Android.Net.Uri.FromFile(App._file)); StartActivityForResult(intent, 200); } 

thanks

Inactive emulator button

+6
source share

All Articles