My application base is ionic capacitor. We have created the below setAuthWebViewSettings for opening the webview with url.
@SuppressLint("SetJavaScriptEnabled")
private void setAuthWebViewSettings(WebView webView) {
webView.setWebViewClient(new mAuthWebViewClient());
WebSettings webSettings = mAuthWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setSupportZoom(false);
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webSettings.setAppCacheEnabled(false);
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
webSettings.setDatabaseEnabled(true);
webSettings.setDomStorageEnabled(true);
if (BuildConfig.DEBUG) {
WebView.setWebContentsDebuggingEnabled(true);
}
}
Below is my activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.Enterprise.xxx.mAuthWebView">
<WebView
tools:context="com.Enterprise.xxx.mAuthWebView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Below are the issues that I am facing in my webview:
- Select options shows capacitor default splash screen in the background (screenshot attached below)
- Date field implemented using date-fns plugin crashes the application
I have tried all the answers in below link, still no luck.
Webview isn't opening select html components (dropdown) when initiating it with application context
Webview not working with HTML select element
Thanks!
from webview shows app splashscreen background in select dropdown option
No comments:
Post a Comment