android-webview

Android - html from android_assets in WebView, CSS not loading in ICS

扶醉桌前 提交于 2020-01-24 03:25:09
问题 I've been writing a small app that basically loads its content from locally stored HTML and CSS into a WebView. I initially started this when I had a device running Android 2.3 and had no issues. I recently got a Galaxy Nexus but the CSS doesn't appear to load in ICS. I read something that suggested enabling hardware acceleration would help but it does nothing. I'm now at a complete loss. Javascript seems to load fine so, combined with it working well on 2.3, suggests it's not the way I'm

How to open webview in popupwindow in android?

泪湿孤枕 提交于 2020-01-24 00:24:34
问题 I want to add web view in PopupWindow in my android application.This is only working for alert dialog. And this is my code: AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this); alert.setTitle("Google"); WebView wv = new WebView(MainActivity.this); wv.loadUrl("http:\\www.google.com"); wv.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } }); alert.setView(wv); alert

WebView Links not opening

一世执手 提交于 2020-01-23 12:11:53
问题 I am trying to open a link using Webview in Android. There are some links embedded into WebView. My problem is webview is not opening any link that does not starts with www. For ex, www.google.com is working but maps.google.com is not.I have also tried to override WebViewClient but it didn't work. One thing I noticed is by putting Toast to see what url is being called in WebViewClient. It showed perfect for www.google.com but returned nothing for other links. I thing WebViewClient is not

WebView Links not opening

穿精又带淫゛_ 提交于 2020-01-23 12:11:34
问题 I am trying to open a link using Webview in Android. There are some links embedded into WebView. My problem is webview is not opening any link that does not starts with www. For ex, www.google.com is working but maps.google.com is not.I have also tried to override WebViewClient but it didn't work. One thing I noticed is by putting Toast to see what url is being called in WebViewClient. It showed perfect for www.google.com but returned nothing for other links. I thing WebViewClient is not

Android Webview cannot render the pdf sometimes and shows blank/white page instead

你。 提交于 2020-01-23 07:14:48
问题 Open the pdf in the webview using google docs Open the same pdf or different pdf again and again. Sometimes it will show the blank/white page in the android untill we refresh the webpage again for 1 or 2 times. I have made the sample on the pdf. The link for the project is shown below: https://github.com/gopalawasthi123/PdfWebView Hope this will help you Better. public void SetWebView(WebView webview,string externalUrl){ webview.Tag = "webview"; webview.Settings.JavaScriptEnabled = true;

Android Webview cannot render the pdf sometimes and shows blank/white page instead

本秂侑毒 提交于 2020-01-23 07:13:44
问题 Open the pdf in the webview using google docs Open the same pdf or different pdf again and again. Sometimes it will show the blank/white page in the android untill we refresh the webpage again for 1 or 2 times. I have made the sample on the pdf. The link for the project is shown below: https://github.com/gopalawasthi123/PdfWebView Hope this will help you Better. public void SetWebView(WebView webview,string externalUrl){ webview.Tag = "webview"; webview.Settings.JavaScriptEnabled = true;

Filename are missing for openFileChooser Android 4.4.4

白昼怎懂夜的黑 提交于 2020-01-23 04:33:05
问题 Goal: to be able to attach a file of any type to a <input type="file" /> in a webview in Android 4.1+ . (Android 5+ is fine) I set openFileChooser as I saw fit based on few examples I have found. It works on 4.1 but not on 4.4.4 where the files attached do not have their filename correctly set . Instead is set as filename the last path of the intent.mData return to onActivityResult , .e.g, for a mData value of content://com.android.providers.downloads.documents/document/2 , the filename will

How to get WebViewClient.shouldInterceptRequest invoked asynchronously

…衆ロ難τιáo~ 提交于 2020-01-22 05:32:05
问题 I want to create an Intranet-Application. This app is going to show content, normally only reachable in our internal environment. e.g. http://intranet.ourfirm.com Now we are having the possibility to access this content from external e.g. https://ourproxy.com/ourIntranetApplicationID/ (this will be directed to http://intranet.ourfirm.com) I change every original url like http://intranet.ourfirm.com/whatever/index.html to https://ourproxy.com/ourIntranetApplicationID/whatever/index.html. In

Android Webview not triggering a href download file

雨燕双飞 提交于 2020-01-22 02:00:28
问题 I have added the Download Manager , but it is not triggering the download event , can any body help . When user goes to webview download option and click a link to download a file nothing happens. I have gone through many of the post in stackoverflow but nothing works for me. public class MainActivity extends AppCompatActivity { private WebView mWebView; // boolean thread_running = true; private static final String TAG = "MainActivity"; // flag for Internet connection status Boolean

WebView not accepting some cookies

喜夏-厌秋 提交于 2020-01-21 09:27:04
问题 I'm loading a website in Webview which uses some cookies to store session. I've written following lines to accept cookies CookieSyncManager.createInstance(this); CookieSyncManager.getInstance().startSync(); CookieManager.getInstance().setAcceptCookie(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { CookieManager.setAcceptFileSchemeCookies(true); CookieManager.getInstance().setAcceptThirdPartyCookies(webView, true); } webView.loadUrl("https://www.irctc.co.in/nget/train