How to get file content of file which is choosen when calling Intent.CreateChooser

I have created an intent to open dialog box for user to pick file from android file system
Intent intent = new Intent(Intent.ActionGetContent);
intent.SetType("/");
intent.AddCategory(Intent.CategoryOpenable);
StartActivityForResult(Intent.CreateChooser(intent, "Select a file"),0);
the dialog box opens and I choose a file , but then nothing happens. I read that I have to put some logic in
public void onActivityResult(int requestCode, int resultCode, Intent data)
{}
I created that method in MainActivity where my intent instantiation is. But after I've choosen the file from filebrowser than method don't get called

Sign In or Register to comment.