In trying to select an image from the android file system, I am currently using the following code:
public void getPhotoFromSystem(View v) //implement selecting multiple files
{
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.setType("image/*)");
startActivityForResult(intent, READ_REQUEST_CODE);
}
Followed by a method such as:
public void onActivityResult(int requestCode, int resultCode, Intent resultData)
{
if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK){
uri = resultData.getData();
//do some more stuff
}
This works, but doesn't actually allow me to select multiple files at once, and also won't allow me to grab a photo outside the default photo gallery. I've tried some other suggestions I've seen, and nothing has worked.