Forum Xamarin.Android

Java.Lang.NullPointerException

Code Snippet :
var imageIntent = new Intent();
imageIntent.SetType("image/*");
imageIntent.SetAction(Intent.ActionGetContent);
StartActivityForResult(Intent.CreateChooser(imageIntent, "Select photo"),0);

PS: Exception comes on last line. On debugging , it is showing "Intent" class is null(for accesing static method "CreateChooser"), while object imageIntent is not null.

Sign In or Register to comment.