Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot choose image or video on lollipop (REQUEST_PICK_PICTURE_OR_VIDEO) #94

Open
tplkn opened this issue Jun 16, 2015 · 5 comments
Open

Comments

@tplkn
Copy link

tplkn commented Jun 16, 2015

Base code is

this.mediaChooserManager = new MediaChooserManager(this, ChooserType.REQUEST_PICK_PICTURE_OR_VIDEO);
 this.mediaChooserManager.setMediaChooserListener(this);

and

mediaChooserManager.choose();

it works on 4.4, but doesn't work on lollipop.

@coomar2841
Copy link
Owner

It doesn't show anything at all? Or you are not able to choose images/videos? I haven't tested this out yet on lollipop, especially PICK_PICTURE_OR_VIDEO. Will check it out, and update this issue.

@tplkn
Copy link
Author

tplkn commented Jul 2, 2015

I'm not able to choose images, i can choose only videos

@hjanuschka
Copy link

same here on lolipop actionbar title is "Choose Video" - even if PICK_PICTURE_OR_VIDEO is set. and only lets me select videos. only when using the built-in "photos" app.
using another gallery app, works as expected.

@hjanuschka
Copy link

possible solution - as found on SO.
in https://github.com/coomar2841/image-chooser-library/blob/dev/image-chooser-library/src/main/java/com/kbeanie/imagechooser/api/MediaChooserManager.java#L180

you should use /* instead of images/, videos/

sample

if (Build.VERSION.SDK_INT < 19) {
        Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); 
        photoPickerIntent.setType("image/* video/*");
        startActivityForResult(photoPickerIntent,REQUEST_CODE_GALLERY_FILES);
   } else {
        Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
        photoPickerIntent.setType("*/*");
        startActivityForResult(photoPickerIntent, REQUEST_CODE_GALLERY_FILES);
   }

SO thread: http://stackoverflow.com/questions/32375385/android-pick-video-files-from-gallery-not-working-in-nexus-5

can you fix it? and relase a new version, not sure how to fork repo, and integrate into my gradle (pretty new to android)

@macdonaldj
Copy link

macdonaldj commented Sep 7, 2016

still an issue in 1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants