PrivacyScreenPlugin
PrivacyScreenPlugin copied to clipboard
Not working correctly with inAppBrowser
great plugin. in testing i did run into an issue. i used the apache "inAppBrowser" and just used google.com as the url. I then simply hit the home button. in the console i get the message "Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates." testing the rest of the app in all the other functions it worked great. I am using cordova 3.6.3 on a iPad Air 2 running ios 8.1. Not that it should matter, but i am also using JqueryMobile 1.4.3. Any idea on how to fix this i did not see any settings that i had to change.
thanks for any input...
You can modify "InAppBrowser" plugin.
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
add above line into "InAppBrowserDialog" constructor.
There is a PR for inAppBrowser right now that might be what we need.
https://github.com/apache/cordova-plugin-inappbrowser/pull/164
If it works, I am hoping to have a look and get consensus to merge it in.
Ugh. The PR was never merged in it looks like.
Not sure what the next step is here...
apache/cordova-plugin-inappbrowser#164 is work for inAppBrowser,
but can't work on themeableBrowser
error: cannot find symbol
...
if (!features.disableAnimation) { dialog.getWindow().getAttributes().windowAnimations = android.R.style.Animation_Dialog; }
int flags = cordova.getActivity().getWindow().getAttributes().flags;
if ((flags & WindowManager.LayoutParams.FLAG_SECURE) != 0) {
// dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
dialog.getWindow().addFlags(LayoutParams.FLAG_SECURE);
}
this plugin doesn't work on iOS10.0-10.3