In my app I let users pick a photo from their gallery. I use an intent like this:
Intent pickPictureIntent = new Intent(Intent.ACTION_PICK,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
And before I start this intent I check if there is any app that can handle it:
if (pickPictureIntent.resolveActivity(getActivity().getPackageManager()) != null) {
startActivityForResult(pickPictureIntent, SELECT_PICTURE_FROM_GALLERY_REQUEST_CODE);
}
But two of my users get this exception when they try to pick a photo from their gallery:
Exception android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.PICK dat=content://media/external/images/media }
As far I know this happens when there is no activity to handle the intent but as you see I check the possibility of having no activity to handle the intent in my code.