Bug 24714 - "Android - Record Video" recipe uses an incomplete file path as its output location.
Summary: "Android - Record Video" recipe uses an incomplete file path as its output lo...
Alias: None
Product: Documentation
Classification: Xamarin
Component: Recipes ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Amy Burns
Depends on:
Reported: 2014-11-20 21:18 UTC by Matthew Robbins
Modified: 2015-12-08 18:52 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 24714 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Matthew Robbins 2014-11-20 21:18:38 UTC
See this recipe:

When building the file path for the exported video, the recipe uses Android.OS.Environment.ExternalStorageDirectory.Name to build the filename:

 string path = Android.OS.Environment.ExternalStorageDirectory.Name + "/test.mp4";

Say the external storage directory is "/storage/emulated/0", the generated path name will be "0/test.mp4". This will resolve to a folder in the root directory called "0", which may or may not exist.

Unless the user creates this directory first, a "Java.IO.FileNotFoundException" will be thrown on "recorder.Prepare();".

The path name should be built using Android.OS.Environment.ExternalStorageDirectory.AbsolutePath rather than the directory name:

 string path = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/test.mp4";

See this StackOverflow answer for background:
Comment 1 Amy Burns 2015-12-08 18:52:59 UTC
Created issue for this to track it better: https://github.com/xamarin/documentation/issues/1045