android-webview

WebView images are not showing with HTTPS

流过昼夜 提交于 2019-12-20 10:29:23
问题 My application opens a web view to show HTML page, which is hosted with HTTPS contains one image(image coming from http). On some devices image is not showing but for all other devices its working fine. I checked with multiple devices like Nexus, Samsung s6/s4, Moto G2 and others. Only on Samsung S4/S6, nexus image is not showing. but for all other devices its working fine. Even i tried with WI-FI, data carrier, and multiple OS versions but no luck. Please help to solve this. some

shouldOverrideUrlLoading does not work/catch link clicks while page is loading

空扰寡人 提交于 2019-12-20 09:56:22
问题 I am using WebViewClient.shouldOverrideUrlLoading to catch any link clicks in the WebView. This works about 95% of the time, but sometimes it is simply not called. I have noticed it in these three circumstances: When the link points to the page they are already on. This one isn't a really big deal, and there is a bug reported for it. While the page is still loading, if the user clicks a link, it rarely catches it. It will just open the link without ever calling shouldOverrideUrlLoading .

Lifecycle of a session cookie in an Android WebView / CookieSyncManager

六眼飞鱼酱① 提交于 2019-12-20 09:47:22
问题 I have an Android application which makes requests to my webserver via both a WebView and an HttpClient. I sync cookies between the two using a CookieSyncManager. So far, so good. When my application starts (inside onResume()), I run a piece of logic similar to the following: if ( appHasBeenIdleFor30Minutes() ) { CookieManager cookieManager = CookieManager.getInstance(); cookieManager.removeSessionCookie(); CookieSyncManager.getInstance().sync(); } This correctly resets any session cookies

Android WebView not loading Mixed Content

好久不见. 提交于 2019-12-20 08:58:04
问题 I'm trying to make a app with WebView, but the website is using https , but the content (ex. mp3 file) uses http , so Android Lollipop won't load it because it is "Mixed Content". I tried to use onReceivedSslError handler.proceed(); , but it doesn't load anything. Is there a way to fix it? or could I just make all websites loaded use http , so It doesn't show any errors? 回答1: Since Pie (API 29), all non-HTTPS traffic in app is now disabled by default. If you're targeting API level 26 or above

Android WebView not stopping after user presses back

巧了我就是萌 提交于 2019-12-20 08:56:55
问题 I am playing a YouTube video inside a WebView. I am able to play it, but when the person leaves the screen, I am not able to stop the audio from playing. I tried various things inside onDestroy and onPause, or taking them out entirely, but they didn't seem to make a difference. Would anyone know why the audio keeps playing and doesn't stop even after the app is turned off and the user opens other apps? Here is my code for the whole class: import com.flurry.android.FlurryAgent; import utils

How to open links in new tab android webview? [closed]

北城以北 提交于 2019-12-20 07:47:30
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I have created a android app using webview to display my site, i even want to add the functionality to open the link in new tab but I can't find any guides on it. The idea am thinking which can be used is, check if user long clicks, present menu options to open or open in new tab,

Fetch URL of current page from WebView

断了今生、忘了曾经 提交于 2019-12-20 06:21:39
问题 I have a link which contains collection of books (for eg. www.bookstore.com ), from which I select one book (with URL www.bookstore.com/book1.epub ) which should be downloaded to my library when user clicks on Download button of that book. I'm done with download part but what is bothering to me is How will I get the URL of specific book which has been selected by user to download i.e. www.bookstore.com/book1.epub ? I tried with webView.getUrl() , but it doesn't get fired at all except for

android Soft keyboard cover the input box in the webview

纵然是瞬间 提交于 2019-12-20 05:16:41
问题 I use Webview to load some url ,there is a input box in the webview .when I click the input box ,the soft keyboard conver the input box ,how can i do to solve 回答1: If you are saying that you are making an application for android and that the soft keyboard is covering an input box when you are testing your application and you would like to fix this issue, you should try the following: android:windowSoftInputMode="adjustResize" to the the tag in the manifest and to all your webviews/views. This

Using webView's loadDataWithBaseURL not loading images from sdcard

淺唱寂寞╮ 提交于 2019-12-20 04:16:10
问题 I would like to set some html content in my webview with some pictures. I've read on the internet i must use loadDataWithBaseUrl to do such a thing because i need to link the folder of images (basUrl) in order. My html content nicely loads, i can even ran the javascripts perfectly, but for some reason my images cannot be loaded. Somewhere i've read there are some security reasons and thats why i cant load images from sd card to webview and some says it can be easily done via

How to extract values from FileChooserParams when onShowFileChooser() gets called?

南楼画角 提交于 2019-12-20 03:09:07
问题 We have a hybrid app that runs on Android and using webapp pages created in MVC. We have 2 buttons - 1. Document upload - Files, Gallery options should be available when this is clicked (no camera option) 2. Camera upload - clicking on this should trigger camera app in phone. I have following code on mvc view : <input type="file" id="uploadFile" name="files" accept=".pdf,.jpg,.jpeg,.gif,.png" style="display:none;" /> <input type="file" id="capture" name="LnFImage" accept="image/*" capture=