Skip to content

add picke visual media api #22

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add picke visual media api #22

wants to merge 4 commits into from

Conversation

dinitri
Copy link
Member

@dinitri dinitri commented Feb 25, 2025

Add the PickVisualMedia api in addition of the file picker

(Toast.makeText(cordova.getContext(), toastMsg, Toast.LENGTH_LONG)).show();
}
private void showMaxLimitWarning(int deviceMaxLimit) {
String toastMsg = "The maximumImagesCount:" + this.maxImageCount +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String toastMsg = "The maximumImagesCount:" + this.maxImageCount +
String toastMsg = "The maximumImagesCount: " + this.maxImageCount +

Copy link

@sc-nick sc-nick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use a single method showMaxLimitWarning(boolean useFilePicker, int deviceMaxLimit = null) since we already know that useFilePicker = false if it's not used?

@HashirRajah
Copy link
Member

Why not use a single method showMaxLimitWarning(boolean useFilePicker, int deviceMaxLimit = null) since we already know that useFilePicker = false if it's not used?

I think in Java we can't have parameters with default value. I might be wrong.

@sc-nick
Copy link

sc-nick commented Feb 26, 2025

Why not use a single method showMaxLimitWarning(boolean useFilePicker, int deviceMaxLimit = null) since we already know that useFilePicker = false if it's not used?

I think in Java we can't have parameters with default value. I might be wrong.

yes it's not possible in Java, but we can still check its value

@dinitri
Copy link
Member Author

dinitri commented Feb 26, 2025

Why not use a single method showMaxLimitWarning(boolean useFilePicker, int deviceMaxLimit = null) since we already know that useFilePicker = false if it's not used?

I think in Java we can't have parameters with default value. I might be wrong.

yes it's not possible in Java, but we can still check its value

@sc-nick I wanted to take advantage of the concept of OOP, that is polymorphism, more precisely the method overloading concept

dinitri and others added 3 commits February 28, 2025 17:06
Co-authored-by: Mouhammad Hashir Hassam Rajah <[email protected]>
Co-authored-by: Mouhammad Hashir Hassam Rajah <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants