Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
We can run the media picker sample, although it seemed to return a null image for some reason, but when we try to put almost the same code in our app, it crashes in the Xamarin.Mobile assembly. We checked the permissions, and the sample does not seem to require any permissions (e.g. the camera permission).
We are getting the following stack trace:
0x7 in Xamarin.Media.MediaPickerActivity.Touch
0x158 in Xamarin.Media.MediaPickerActivity.OnCreate
0x12 in Android.App.Activity.n_OnCreate_Landroid_os_Bundle_
0x12 in System.Object.36e725bc-2d06-4843-bb15-3a6de0d158e2
Where were you trying this? The simulator, or a device (and which device running what version)?
It turns out we were missing the external storage permission. The NullReferenceException is not an issue, but the null image is still an issue. I will file a separate bug for this.
It might be a good idea, if it's not already there, to document that the external storage permission is required to use the MediaPicker class to take photos.