Are you running on this on a device?  or on the emulator?

On Mon, May 6, 2013 at 12:09 PM, Massimiliano Fabbri
<ma...@doxamedia.com> wrote:
> I'm following the camera photo sample from here:
> http://docs.xamarin.com/recipes/android/other_ux/camera_intent/take_a_picture_and_save_using_camera_app
>
> The issue I got is the _file variable is always null!!
> the _dir variable is ok.
>
> Where I'm wrong ?
>
> Java.IO.File _file;
> Java.IO.File _dir;
>
> private void TakeAPicture(object sender, EventArgs eventArgs)
>     {
>             Intent intent = new Intent(MediaStore.ActionImageCapture);
>
>             _file = new Java.IO.File(_dir, String.Format("myPhoto_{0}.jpg",
> Guid.NewGuid()));
>
>             intent.PutExtra(MediaStore.ExtraOutput,
> Android.Net.Uri.FromFile(_file));
>
>             StartActivityForResult(intent, 100);
>       }
>
>
> ...........
> ...........
> protected override void OnActivityResult(int requestCode, Result resultCode,
> Intent data)
>         {
>             base.OnActivityResult(requestCode, resultCode, data);
>
>             if (requestCode == 100 && resultCode == Result.Ok)
>             {
>                 if (_file != null) <----------- Is always False!!!
>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>



-- 
http://www.opgenorth.net
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to