mirror of
https://github.com/laurent22/joplin.git
synced 2025-03-26 21:12:59 +02:00
Android: Enable debugging of WebView on browser (#2586)
Enables debugging for the android plugin which `react-native-webview` uses. This method is mentioned in their guide for the same. https://github.com/react-native-community/react-native-webview/blob/master/docs/Debugging.md Unfortunately the call requires API version >= 19 (After Kitkat), which is fine because this will be disabled in production builds anyways.
This commit is contained in:
parent
0be982c798
commit
95eb302a62
@ -2,6 +2,8 @@ package net.cozic.joplin;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.webkit.WebView;
|
||||
import com.facebook.react.PackageList;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
|
||||
@ -51,6 +53,13 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
// Enable debugging with the WebView we use to display notes
|
||||
// Changes are made as recommended by folks at `react-native-webview`
|
||||
// https://github.com/react-native-community/react-native-webview/blob/master/docs/Debugging.md
|
||||
if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
}
|
||||
|
||||
// To try to fix the error "Row too big to fit into CursorWindow"
|
||||
// https://github.com/andpor/react-native-sqlite-storage/issues/364#issuecomment-526423153
|
||||
// https://github.com/laurent22/joplin/issues/1767#issuecomment-515617991
|
||||
|
Loading…
x
Reference in New Issue
Block a user