jamesmontemagno / Xamarin.Plugins

Cross-platform Native API Access from Shared Code!
MIT License
1.3k stars 380 forks source link

[Media] Taking a video on Marshmallow(6.0.1) always returns null. #297

Closed swansca79 closed 8 years ago

swansca79 commented 8 years ago

Please take a moment to fill out the following (change to preview to check or place x in []):

This is a

Which plugin does this impact:

Version Number of Plugin: 2.3.0 Device Tested On: Nexus 6P 6.0.1 w/ April Security patches Simulator Tested On:

Expected Behavior

Taking a video should return a MediaFile result.

Actual Behavior

Always returns null.

Steps to reproduce the Behavior

When this was originally implemented it worked, and all I can say for sure was that it was before the April security patches on my Nexus 6P. This bug does not happen on pre-marshmallow devices.

  1. New forms project 2.2.0.31 (also happens on 2.1.0.6529)
  2. Add media plugin
  3. Run this code
async void MakeNewVideo(){
  IMedia media = CrossMedia.Current;
  await media.Initialize ();
  if (media.IsTakeVideoSupported) {
    MediaFile result = await media.TakeVideoAsync (new StoreVideoOptions (){ Quality= VideoQuality.Medium });
     if (result != null) {
        VideoPathLabel.Text += result.Path;
      } 
  } 
}
jamesmontemagno commented 8 years ago

This issue was moved to jamesmontemagno/MediaPlugin#10