Commit d45145bae5d55705542a10b5ff7536bad99a7f06
Committed by
Andrei Pfeiffer
1 parent
de8dec64
Exists in
master
Fix crash on API lower than 19 (Android 4.4)
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
android/src/main/java/com/rncustomwebview/CustomWebViewManager.java
1 | 1 | package com.rncustomwebview; |
2 | 2 | |
3 | 3 | import android.net.Uri; |
4 | +import android.os.Build; | |
4 | 5 | import android.webkit.ConsoleMessage; |
5 | 6 | import android.webkit.GeolocationPermissions; |
6 | 7 | import android.webkit.ValueCallback; |
... | ... | @@ -56,7 +57,9 @@ public class CustomWebViewManager extends ReactWebViewManager { |
56 | 57 | }); |
57 | 58 | |
58 | 59 | // force web content debugging on |
59 | - WebView.setWebContentsDebuggingEnabled(true); | |
60 | + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
61 | + WebView.setWebContentsDebuggingEnabled(true); | |
62 | + } | |
60 | 63 | return webView; |
61 | 64 | } |
62 | 65 | ... | ... |