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

Replaces deprecated Android addDefaultShareMenuItem with setShareState #307

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jezallan
Copy link

PR Checklist

What is the current behavior?

The Android option enableDefaultShare uses a deprecated method setDefaultShareMenuItemEnabled on CustomTabsIntent.

It is not possible to disable the share button with the current option.

What is the new behavior?

This PR replaces the enableDefaultShare option with a new enableShareState option that uses the new setShareState method.

This allows the share button in the toolbar to be enabled or disabled.

BREAKING CHANGES:
enableDefaultShare option changed to enableShareState

@jdnichollsc
Copy link
Member

@jezallan Hey mate, thanks for your contribution! Can you use Reflection to avoid a BREAKING CHANGE here? Please check out this example: https://github.com/proyecto26/react-native-inappbrowser/blob/develop/android/src/main/java/com/proyecto26/inappbrowser/RNInAppBrowser.java#L95

Let me know what you think! <3

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.

None yet

2 participants