I have a webview set up that works.
It loads a page from the root of the assets folder called index.html
I want it a html link in that index.html to be able to open a local link that can be found in assets\catalyst\index.html
I have added the link in the root index file, but when i click the link in the app, it crashes.
I have tried
<a href="file:///android_asset/catalyst/index.html">
<a href="./catalyst/index.html">
but neither stop it crashing.
i assume it is some sort of permissions.
i set a lot of "getSettings" on the original webview, that I hoped would cover all the permissions but to no avail.
This is the link in the root index.html
<a href="file:///android_asset/catalyst/index.html"><img src="./homepage/catalystimage.jpg" alt="catalystimage"></a>
This is in the Java file allowing the loadurl of the first webview.
webView=findViewById(R.id.webviewid);
webView.setWebChromeClient(new WebChromeClient());
webView.loadUrl("file:///android_asset/index.html");
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setPluginState(WebSettings.PluginState.ON);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setAllowContentAccess(true);
webView.getSettings().setLoadsImagesAutomatically(true);
webView.getSettings().setAllowFileAccessFromFileURLs(true);
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
WebView.setOverScrollMode(View.OVER_SCROLL_NEVER);````
i want it to load the local index.html file from the subfolder.
it crashes the app.