Can't select photos and videos at the same time in the New Google Photos app

After updating Google Photos, I can't select video and photo at the same time. If I use single intent "video / *" or "image / *" it works as usual. In the video-photo intent, it ignores the second parameter. If the first video is the intent of the video, if it is a photograph, you are prompted to select a photo.

    Intent intent = new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
    intent.setAction(Intent.ACTION_PICK);
    intent.setType("video/*,image/*");
    intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
    intent.putExtra(MediaStore.EXTRA_OUTPUT, getFileUri());
    startActivityForResult(intent, 911);

      

Do you know how to make it work?

+3


source to share


1 answer


For some reason Google Photos stopped responding to the second type if you set them in the ACTION_GET_CONTENT intent. It also ignores the second type unless you set the Uri. This code should work though:



Intent intent = new Intent(Intent.ACTION_PICK, Media.EXTERNAL_CONTENT_URI);
    intent.setType("video/*,image/*");

      

-1


source







All Articles