I have an Android app built on top of the Ionic/Cordova platform. By default Remote Android Debugging is enabled.
https://developers.google.com/web/tools/chrome-devtools/remote-debugging/
This means that if the device is connected to a computer, one can go open the Chrome browser, go to chrome://inspect find a list of webpages, or app's with webviews, click inspect and see the apps HTML, JS and other resources. This is fine for debugging but I'd like this disabled in the released app.
In trying to disable this (or find where its been enabled) I found theres a function
@TargetApi(Build.VERSION_CODES.KITKAT)
private void enableRemoteDebugging() {
try {
WebView.setWebContentsDebuggingEnabled(true);
} catch (IllegalArgumentException e) {
LOG.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
e.printStackTrace();
}
}
in SystemWebViewEngine.java in the Cordova directory.
Is there a configuration that can be set or another way for this to be disabled?