Skip to content

refactor(android): add mimeTypes property to ImagePicker class #304

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

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

xuhcc
Copy link
Contributor

@xuhcc xuhcc commented Sep 4, 2019

Following the discussion in #301

PR Checklist

What is the current behavior?

On Android, even when media type is set to ImagePickerMediaType.Any, it is not possible to select any file except image or video, everything else is greyed out.

What is the new behavior?

Behavior remains the same, but the new code structure would allow customization of picker behavior in subclasses, for example:

class FilePicker extends ImagePicker {

    get mimeTypes() {
        let mimeTypes = Array.create(java.lang.String, 1);
        mimeTypes[0] = '*/*';
        return mimeTypes;
    }
}

@tgpetrov
Copy link
Contributor

tgpetrov commented Sep 9, 2019

@xuhcc Can you rebase this one as well?

This would allow customization of picker behaviour in subclasses.
@xuhcc
Copy link
Contributor Author

xuhcc commented Sep 9, 2019

Yes, rebased.

@xuhcc
Copy link
Contributor Author

xuhcc commented Sep 9, 2019

Thanks!

@xuhcc xuhcc deleted the extra-mime-types branch September 10, 2019 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants