From c10f3c12967a32df0b2e6f8d2a12a1fdf93074e0 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 8 May 2023 12:06:46 -0700 Subject: [PATCH] Disable cache --- app/src/main/java/gallery/memories/MainActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/gallery/memories/MainActivity.java b/app/src/main/java/gallery/memories/MainActivity.java index 59dd850d..79efc52b 100644 --- a/app/src/main/java/gallery/memories/MainActivity.java +++ b/app/src/main/java/gallery/memories/MainActivity.java @@ -31,8 +31,8 @@ public class MainActivity extends AppCompatActivity { protected void initializeWebView() { binding.webview.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { - view.loadUrl(request.getUrl().toString()); - return false; + view.loadUrl(request.getUrl().toString()); + return false; } }); @@ -44,6 +44,7 @@ public class MainActivity extends AppCompatActivity { webSettings.setDatabaseEnabled(true); webSettings.setUserAgentString("memories-native-android/0.0"); + binding.webview.clearCache(true); binding.webview.addJavascriptInterface(mNativeX, "nativex"); binding.webview.loadUrl("http://10.0.2.2:8035/index.php/apps/memories/"); }