From b29d825b273cf35aff5f36a1b072378e16effd1e Mon Sep 17 00:00:00 2001 From: "Warren R. Bank" Date: Tue, 1 Sep 2020 05:43:44 -0700 Subject: [PATCH] enable remote debugger when: * phone is connected to a remote computer by `adb` - either: * physically with a USB cable * wirelessly over a LAN user can: * inspect contents of WebView in DevTools with Chrome desktop at: chrome://inspect/#devices quick refresher: * # enable USB debugging * # connect by USB adb devices adb tcpip 5555 # disconnect USB * # connect by WiFi from any computer: adb connect 192.168.1.x:5555 adb devices --- .../com/github/warren_bank/webmonkey/BrowserActivity.java | 3 +++ android-studio-project/constants.gradle | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/android-studio-project/WebMonkey/src/main/java/com/github/warren_bank/webmonkey/BrowserActivity.java b/android-studio-project/WebMonkey/src/main/java/com/github/warren_bank/webmonkey/BrowserActivity.java index 48587ca..45f2adc 100644 --- a/android-studio-project/WebMonkey/src/main/java/com/github/warren_bank/webmonkey/BrowserActivity.java +++ b/android-studio-project/WebMonkey/src/main/java/com/github/warren_bank/webmonkey/BrowserActivity.java @@ -17,6 +17,9 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + if (Build.VERSION.SDK_INT >= 19) + WebViewGm.setWebContentsDebuggingEnabled(true); + WebViewGm webViewGm = scriptBrowser.getWebView(); String secret = webViewGm.getWebViewClient().getSecret(); diff --git a/android-studio-project/constants.gradle b/android-studio-project/constants.gradle index fca2881..ddc1620 100644 --- a/android-studio-project/constants.gradle +++ b/android-studio-project/constants.gradle @@ -1,6 +1,6 @@ project.ext { - releaseVersionCode = Integer.parseInt("001000208", 10) - releaseVersion = '001.00.02-08API' + releaseVersionCode = Integer.parseInt("001000308", 10) + releaseVersion = '001.00.03-08API' javaVersion = JavaVersion.VERSION_1_8 minSdkVersion = 8 targetSdkVersion = 28