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

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

            ////RM: hack for working on windows phone?
            _mediaPicker = DependencyService.Get <IMediaPicker>() ?? device.MediaPicker;
        }
Exemple #2
0
        /// <summary>
        /// Setups this instance.
        /// </summary>
        private void Setup()
        {
            if (_mediaPicker != null)
            {
                return;
            }
            //System.NullReferenceException: IResolver has not been set.Please set it by calling Resolver.SetResolver(resolver) method.

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

            ////RM: hack for working on windows phone?
            _mediaPicker = DependencyService.Get <Xamarin.Forms.Labs.Services.Media.IMediaPicker>() ?? device.MediaPicker;
        }