[x] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
[x] All existing tests are passing
[x] Tests for the changes are included
What is the current behavior?
enableDefaultShare: false is not working on android
What is the new behavior?
enableDefaultShare: false is now working on android
Fixes/Implements/Closes #[Issue Number].
Replaced the native library code in RNInAppBrowser.java
from
if (options.hasKey(KEY_DEFAULT_SHARE_MENU_ITEM) &&
options.getBoolean(KEY_DEFAULT_SHARE_MENU_ITEM)) {
builder.addDefaultShareMenuItem();
}
to
if(options.hasKey(KEY_DEFAULT_SHARE_MENU_ITEM)){
if(options.getBoolean(KEY_DEFAULT_SHARE_MENU_ITEM)){
builder.setShareState(CustomTabsIntent.SHARE_STATE_ON);
}else{
builder.setShareState(CustomTabsIntent.SHARE_STATE_OFF);
}
}else{
builder.setShareState(CustomTabsIntent.SHARE_STATE_OFF);
}
PR Checklist
What is the current behavior?
enableDefaultShare: false is not working on android
What is the new behavior?
enableDefaultShare: false is now working on android
Fixes/Implements/Closes #[Issue Number].
Replaced the native library code in RNInAppBrowser.java
from
to if(options.hasKey(KEY_DEFAULT_SHARE_MENU_ITEM)){ if(options.getBoolean(KEY_DEFAULT_SHARE_MENU_ITEM)){ builder.setShareState(CustomTabsIntent.SHARE_STATE_ON); }else{ builder.setShareState(CustomTabsIntent.SHARE_STATE_OFF); } }else{ builder.setShareState(CustomTabsIntent.SHARE_STATE_OFF); }