Webview Android - Not showing Menu of the website - android

Not showing menu in android app
In chrome and other browser it shows properly as below
Chrome showing proper menu
everything is enabled Dom, Javascript - code snippet as below.
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
webView.getSettings().setLoadsImagesAutomatically(true);
webView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
webView.setWebViewClient(new WebViewClient());
webView.setWebViewClient(new Browser_Home());
webView.setWebChromeClient(new ChromeClient());
webSettings.setAllowFileAccess(true);
webSettings.setAppCacheEnabled(true);

Related

i Cant Select file in my own browser in android

I have created an android app for a simple website view (Using webview) but I can't select file using
I am trying to make a app which completely load the website made using php
use your Web view in this way .
webview =(WebView) findViewById(R.id.webView);
WebSettings webSettings=webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webSettings.setDatabaseEnabled(true);
webview.setWebViewClient(new WebViewClient());
webview.loadUrl(url);

WebView not reflecting changes to web page contents

I have a web application running on an AWS and an Android app which is just a WebView to just reflect the web application.
I had the setAppCacheEnabled set to True earlier, but I commented that piece of code in the recent version of the application.
Anytime an update is made to the web page contents, the change does not reflect on the Android WebView.
Below is a snippet of the code:
setContentView(R.layout.activity_main);
myWebView = (WebView)findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
//improve webView performance
myWebView.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
myWebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
//myWebView.getSettings().setAppCacheEnabled(true);
myWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
webSettings.setDomStorageEnabled(true);
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
webSettings.setUseWideViewPort(true);
webSettings.setSaveFormData(true);
webSettings.setSavePassword(true);
webSettings.setEnableSmoothTransition(true);
myWebView.loadUrl(<my web application URL>);
myWebView.setWebViewClient(new WebViewClient());

webpages not loading properly in android webview

I want to load a website in android webview which has pretty good design but in webview only html content is showing. I don't have experience with Web but I think the CSS is not loading.
webView = (WebView) findViewById(R.id.webView);
webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setLoadWithOverviewMode(true);
webSettings.setDomStorageEnabled(true);
webSettings.setUseWideViewPort(true);
webSettings.setLoadWithOverviewMode(true);
webView.loadUrl(myURL);
webView.setWebChromeClient(new ChromeClient());
webView.setWebViewClient(new MyWebViewClient());
Its working fine in iOS webview and in browsers.
Please help. Thanks!

Android webview cant to load daily motion website fully

I am trying to build a apps which will be able to youtube and dailymotion ...
youtube is ok but dailymotion is not load fully,it load's only menu bar with click restricted(no touch allowed)...How will i solve it,any idea please...
My sample code for loading WebView is here
webView.setWebViewClient(new myWebViewClient());
webView.setWebChromeClient(new myWebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSaveFormData(true);
webView.getSettings().setPluginState(WebSettings.PluginState.ON);
webView.loadUrl("http://www.dailymotion.com");
output window:
I have gotten a solution that can solve this problem..i have given my code here if would be beneficial..
webView.setWebViewClient(new myWebViewClient());
webView.setWebChromeClient(new myWebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSaveFormData(true);
webView.getSettings().setPluginState(WebSettings.PluginState.ON);
webView.getSettings().setDomStorageEnabled(true);
webView.loadUrl("http://www.dailymotion.com");

Jquery datepicker not showing in Android Webview. Works in native browser

I'm trying to embed an HTML page in a webview. The page has some jquery and javascript. When an input field is clicked it brings out the jquery datepicker. It works well in the native browser but, doesn't work in the webview. I did set enableJavascript to true but still not showing. So I'm not sure how it works if opened in the native browser, but not if is in webview. Am I missing anything? Any help is appreciated. This is my code:
myWebView = (WebView) findViewById(R.id.webView);
//Enable Javascript
WebSettings webSettings = myWebView.getSettings();
webSettings.setLoadWithOverviewMode(true);
//Enable DOM Storage
webSettings.setDomStorageEnabled(true);
//Enable Zoom
webSettings.setBuiltInZoomControls(true);
//I was adviced to place some of this to handle page navigation:
myWebView.setWebChromeClient(new WebChromeClient());
myWebView.setWebViewClient(new WebViewClient());
//other settings
myWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
myWebView.setScrollbarFadingEnabled(false);
//finally, load url
myWebView.loadUrl("https://www.mycustomurl.com");
You have to enable Javascript in your webview...
like this,
WebView.getSettings().setJavaScriptEnabled(true);
in your code, add this too..
webSettings.setJavaScriptEnabled(true);

Categories

Resources