Android loadUrl unable to load site - android

My webview will works for a site such as Google.com, however, the specific page will not load.
Simply displays subscribe to feedburner (I made this site to reflect a converted news feed)
This specific webpage will display correctly in an Iphone UIWebView, but not for Android.
Some code
WebView rss = (WebView) findViewById(R.id.webviewRSS);
rss.loadUrl("www.newmanu.edu/newmannews");

Check out the source of "www.newmanu.edu/newmannews", you have to activate javascript.
from http://developer.android.com/guide/webapps/webview.html
WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);

Add http:// or https:// before URL.
Try this.
rss.loadUrl("http://www.newmanu.edu/newmannews");
Or
rss.loadUrl("https://www.newmanu.edu/newmannews");

Related

YouTube thumbnail won't load in webview

We have a WebView based android app which loads webpage consisting <a> tags linking to YouTube video.
The web app works fine in a browsers like Chrome for Android and loads thumbnail from YouTube as expected but within WebView the <a> tag won't load the thumbnail of YouTube video.
How can we force the WebView to behave similar to Chrome browser
Have tried setting clients like below, which didn't help
webview.setWebViewClient(new WebViewClient());
webview.setWebChromeClient(new WebChromeClient());
Even added hardware acceleration in AndroidManifest.xml but it didn't work either
android:hardwareAccelerated="true"
Note: JavaScript is also enabled.
Did you try to enable javascript in your webview?
You can enable it like this:
WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);

Advanced webview not loading URL properly

I am using advanced webview in my app. I followed the steps as listed in https://github.com/delight-im/Android-AdvancedWebView.
The problem is , the webview is not loading the URL properly, meaning that, the screen is not aligned properly and in few websites, I am not able to click the buttons.
I use myWebView.getSettings().setJavaScriptEnabled(true); in my code.
Will setJavaScriptEnabled work in advanced webview?
JavaScript and WebStorage are enabled by default according to Github repository:
https://github.com/delight-im/Android-AdvancedWebView
Did you try this?
mWebView = (AdvancedWebView) findViewById(R.id.webview);
mWebView.setListener(this, this);
mWebView.loadUrl("http://www.example.org/");
If that is not working try this use case as for normal WebView
WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);

Stripe.js credit card input form invisible in Webview

I was trying to test if it is possible to integrate stripe js in a website and load that site in an android Webview to proceed for payment. I was using this link https://github.com/stripe/elements-examples to load that in Webview like this:
WebView browser = (WebView) findViewById(R.id.webview);
browser.loadUrl("https://stripe.github.io/elements-examples/");
Everything is loading in the Webview except the credit card field is not there. Either it is not visible or it can not be editable. Why is that?
Try to add below code to enable Javascript in your Webview:
WebSettings webSettings = browser.getSettings();
webSettings.setJavaScriptEnabled(true);

Webview blank page quakenet

Before read my post, I try to search, but I didn't resolve my problem.
I use a webview for QuakeNet IRC WebChat
WebView myWebView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webSettings.setDomStorageEnabled(true);
myWebView.loadUrl("http://webchat.quakenet.org/");
myWebView.setWebViewClient(new WebViewClient());
I have a blankscreen.
But when I try to load http://www.google.com, that's work.
I have try to enable JS, but it's not this.
Can you help me pls.
Thank you :)
The chat on the website seems to use websockets.
According to this post: WebSocket in Android WebView websockets are not supported natively on android webview.
Check your logcat for errors.
You can try to follow this link and change your code http://foretribe.blogspot.it/2013/08/how-to-make-android-webview-support.html

How to display image in webview android?

I am working on android. I am trying to display the page data in webview. i.e actually i am getting the data from php webservice. The result of that php webservice is
a document with images and text.(If we right click on that page and view page source it is all the html data). But now what I am doing is I am setting the php link to the webview. So now, it is display fine in webview (same as how it is displaying in webpage). But now the document contains some images which are displaying in website but those images are not displaying in webview. What should I do now? Please help me in this regard.
Code:
WebView webview;
WebSettings settings;
link = "http://.............../page.php?test=123&test1=345"
webview = (WebView) findViewById(R.id.webView1);
settings = webview.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
webview.getSettings().setLoadWithOverviewMode(true);
webview.getSettings().setUseWideViewPort(true);
webview.getSettings().setPluginState(PluginState.ON);
webview.loadUrl(link);
please add this line,
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setPluginState(PluginState.ON);

Categories

Resources