jamesmontemagno / Xamarin.Plugins

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

Pick Photo issues #308

Closed hlopezg closed 8 years ago

hlopezg commented 8 years ago

This is a

Which plugin does this impact:

Version Number of Plugin: 2.3.0 Device Tested On: Samsung Galaxy S4 Simulator Tested On:

Expected Behavior

Pick a Picture from gallery a show on a image

Actual Behavior

Pick a picture from gallery and isn't showing on Galaxy S4, but in Galaxy S7 is showing correctly

Steps to reproduce the Behavior

I use this code

  private async void OnPickPhotoClicked(object sender, EventArgs e)
  {
      if (!CrossMedia.Current.IsPickPhotoSupported)
      {
          await DisplayAlert("Photos Not Supported", ":( Permission not granted to photos.", "OK");
          return;
      }
      var file = await CrossMedia.Current.PickPhotoAsync();

      if (file == null)
          return;
      image.Source = ImageSource.FromStream(() =>
      {
          var stream = file.GetStream();
          file.Dispose();
          return stream;
      });
  }

The stream return this path: /storage/emulated/0/Android/data/com.mypackage/files/Pictures/temp/IMG_20160518_155754.jpg

And I have these permissions: WRITE_EXTERNAL_STORAGE READ_EXTERNAL_STORAGE CAMERA

jamesmontemagno commented 8 years ago

This issue was moved to jamesmontemagno/MediaPlugin#6