caching webview android and show it offline android [on hold]

112
September 04, 2019, at 3:50 PM
  • I have to capture the web view and show it offline but it is not
    capturing it is showing blank white screen.
  • I need a solution to resolve the issue

       private void setWebView() {
       settings.setBuiltInZoomControls(true);
       settings.setPluginState(WebSettings.PluginState.ON);
       settings.setAppCacheMaxSize(1024*1024*8);
       String appCachePath =  getApplicationContext().getCacheDir().getAbsolutePath();
       settings.setAppCachePath(appCachePath);
       Log.e("vvCace", "appCachePath = " + appCachePath);
       settings.setAllowFileAccess(true);
       settings.setAppCacheEnabled(true);
       settings.setLoadsImagesAutomatically(true);
       settings.setDomStorageEnabled(true);
       settings.setJavaScriptEnabled( true );
       settings.setDefaultTextEncodingName("utf-8");
       settings.setLoadsImagesAutomatically(true);
       settings.setBlockNetworkImage(false);
       settings.setCacheMode( WebSettings.LOAD_DEFAULT );
    
Answer 1

Here are occasions that a WebView cannot be cached natively. If the page header contains the following fields, the WebView will not be able to cache the contents from that page. Cache-Control: no-store, no-cache Pragma: no-cache

In this case, you will have to modify the page property on the server to solve the caching problem.

Rent Charter Buses Company
READ ALSO
How to fix “E/WM-SystemJobScheduler: Unable to schedule” error in Android WorkManager with PeriodicWorkRequest?

How to fix “E/WM-SystemJobScheduler: Unable to schedule” error in Android WorkManager with PeriodicWorkRequest?

I am trying to setup PeriodicWorkRequest using Work Manager in Android using Android x LibraryBut Every time i am getting the follwoing exception

133
Instant Enabled App Bundle Not Downloading Full APK instead shows error

Instant Enabled App Bundle Not Downloading Full APK instead shows error

I'm trying to build the instant enabled app bundle by following this article

113
How to send a text message to a whatsapp group using social sharing plugin

How to send a text message to a whatsapp group using social sharing plugin

I'm developing an ionic app, which could send a text message to a group in WhatsAppI'm already able to send a text message to an individual by using below code :

121
How to fix “Audio streaming Android app crashing because of service null object reference”

How to fix “Audio streaming Android app crashing because of service null object reference”

I'am developing the Audio Streaming Android AppI used foreground service for that

91