-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Android - Changed InAppBrowser.java so it works on modern devices #700
base: master
Are you sure you want to change the base?
Conversation
So I'm pretty new to making PR's to bigger projects, just made this PR since it was asked in the #328 If there is more info I can provide please let me know |
@@ -260,25 +257,6 @@ else if (SYSTEM.equals(target)) { | |||
else if (action.equals("close")) { | |||
closeDialog(); | |||
} | |||
else if (action.equals("loadAfterBeforeload")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have existing features such as this been removed?
|
||
if (lang.startsWith("en")) | ||
{ | ||
title = "Choose the source"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding hard-coded strings such as this is undesirable - better to let the plugin user pass in a string in their locale
WebSettings settings = inAppWebView.getSettings(); | ||
settings.setJavaScriptEnabled(true); | ||
settings.setJavaScriptCanOpenWindowsAutomatically(true); | ||
settings.setBuiltInZoomControls(showZoomControls); | ||
settings.setPluginState(android.webkit.WebSettings.PluginState.ON); | ||
|
||
// Add postMessage interface | ||
class JsObject { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another feature removed with no explanation why
This PR removes several existing features such as the postMessage API and My feeling that in its current state this PR cannot be merged without breaking existing plugin functionality and the additional code is of questionable suitability for generic use by plugin users. |
Thanks for the reply! As mentioned, I made this PR based on issue #328 a lot of code is not made by myself, you should look into the issue for all the reasons and things 😄 |
Hi @PlanB007 @dpa99c i tried above inappbrowser java file in android 10 . And camera is opening correctly. But after selecting image using camera application is crashing with following error.
Kindly help how to resolve above issue. |
Some overlap with #857 ? |
Platforms affected
Android
Motivation and Context
Fixes the issue of the camera not opening or not opening correctly, since this was a major issue. With a very long issue #328 multiple people working on this. With big thanks to @davidrevo for helping a lot! I'm just making the PR so people don't have to search any longer.
Description
Just making the PR so people don't have to search for issue #328
Testing
Tested One Plus 6T with the latest android
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)