Android Webview Displaying Blank Page

android webview displaying blank page specific url only

imageI ran your code in my app and voila it worked.

First add the following line in your manifest file.

android:cleartextTrafficPermitted="true"

Now change the link from https to http and it works perfectly.

Let me know you why I did this..!!
When the original link is compiled I got a error like handshake failed SSL certificate returned -1. So I guess it mean the website has some issues. So try using this.

Hope it helps.

White blank screen using webview

The url target had its SSL "Lets Encrypt" incorrectly configured.
So simple, but it took me a while to find out! So before looking for a hard to crack solution, just point webviewer to another url.

Webview showing blank page after recent chrome update

These are the bunch of settings which solved my problem

 WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mWebView.getSettings().setDomStorageEnabled(true);
mWebView.getSettings().setLoadWithOverviewMode(false);
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
mWebView.getSettings().setSupportMultipleWindows(true);
mWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);

and in the manifest file inside application added

    android:hardwareAccelerated="true"

Android WebView with http loadUrl shows blank/empty page

I think in your code you missed this suppressLint

@SuppressLint("SetJavaScriptEnabled")

Try to change your code like this.. in this way i am able to load your [page]

private WebView mWebview=null ;

@SuppressLint("SetJavaScriptEnabled")
@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

mWebview = new WebView(this);

mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript

final Activity activity = this;

mWebview.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Toast.makeText(activity, description, Toast.LENGTH_SHORT).show();
}
});



mWebview.loadUrl("http://fahrikayahantaksi.com/");
setContentView(mWebview );

}

Don't forgot to add the Internet permission in your manifest !!

uses-permission android:name="android.permission.INTERNET" />


Related Topics



Leave a reply



Submit