Skip to content

Commit

Permalink
enable remote debugger
Browse files Browse the repository at this point in the history
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
  • Loading branch information
warren-bank committed Sep 1, 2020
1 parent 75e7049 commit b29d825
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions android-studio-project/constants.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b29d825

Please sign in to comment.