Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Xamarin.Forms.Labs Peeps!

$
0
0

@KevinFord
@rmarinho

So I used NuGet to get the package added to my project; it also added ExifLib. I set up a class to utilize the camera from my app, based upon your Xamarin.Forms.Labs.Sample app. Your sample works fine...mine crashes. ;)

This method:

        private void Setup()
        {
            if( mediaPicker != null )
            {
                return;
            }

            var device = Resolver.Resolve<IDevice>();

            mediaPicker = DependencyService.Get<IMediaPicker>();
            //RM: hack for working on windows phone? 
            if( mediaPicker == null )
            {
                mediaPicker = device.MediaPicker;
            }
        }

dies for me on Resolver line with an exception that object set to a null reference. If I skip that line, the DependencyService line returns null for mediaPicker. I have included:

using Xamarin.Forms.Labs;
using Xamarin.Forms.Labs.Services;
using Xamarin.Forms.Labs.Services.Media;

My PCL has references to Xamarin.Forms.Labs and ExifLib; my iOS project has references to Xamarin.Forms.Labs, Xamarin.Forms.Labs.iOS, and ExifLib.

Am I missing something else here? I can't see anything special about your sample, or anything you are doing that I'm not... Please help.... :)


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>