Forum Xamarin.Android

receiving Camera Picture from Fragment

Hey guys,

I used this code to get a camera Picture:

The only I had to change, is that I have to do it into a Fragment.

I'm getting the Picture (check with FileInfo) but then I get a null-reference when I am refreshing my Adapter:

        galleryListView.Adapter = new FilesAdapter(this.Activity, fileliste);

If I'm choosing a Picture from the camera it works perfect!

I think the Problem is the SendBroadcast call:

        else if ((requestCode == MainActivity.CAMERA_REQUEST) && (resultCode == Result.Ok))
            Intent mediaScanIntent = new Intent(Intent.ActionMediaScannerScanFile);
            Uri contentUri = Uri.FromFile(camera_file);

do I have to Change this call ?


  • TimElbertTimElbert USMember

    Hello Everybody,

    Is my question explained so badly, or why is nobody answering? I could reword something if it is not understandable, but I don't see anything wrong with my question...

    Need help!!!


Sign In or Register to comment.