Webview loads url and then this image - java

I am trying to open in Webview webpages in same quality as it apears in normal browser. It is ok in most cases, but found one "special" url. Urls loads ok, but then after like 2 secons whole pageview is white with picture of play icon in circle. I can not click on it, just nothing. If I open this website in chrome and other browsers everything is just fine. Im not sure if it is not some kind of javascript, but JS is allowed in Webview.
Website is : https://www.auto.cz/volkswagen-polo-gti-zmena-jako-remen-87481
Image that appears is: https://ibb.co/yh7XPpJ
I have tried a lot of Webview settings but nothing helps. I thing it is causing small javascript ad which will pops-up in bottomside of page when url is opened in phone.
WebSettings wsett = webviewVariable.getSettings();
wsett.setJavaScriptEnabled(true);
wsett.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
wsett.setDomStorageEnabled(true);
wsett.setDatabaseEnabled(true);
wsett.setMinimumFontSize(1);
wsett.setMinimumLogicalFontSize(1);
wsett.setBuiltInZoomControls(true);
wsett.setDisplayZoomControls(false);
wsett.setAppCacheEnabled(true);
webviewVariable.loadUrl(url);
I would like to know what settings is missing.

Related

Adobe acrobat DC and its toolbar in selenium java

I am working on application and using Firefox, in that i have PDF in on of the page. and i have below questions on that,
PDF is not getting opened in web page itself instead it is asking with link 'Tap here to activate plugin' (inside place where pdf will open). Once i click on that it will get open. But through selenium code i am not able to click on that(not able to identify element). i tried to use setPreference but Adobe Acrobat is not getting activated.
IF the PDF opens then i have to mouse over on that and perform action like print, zoom-in and zoom-out on Adobe Acrobat DC toolbar and validate functionality.
Could you please help me to resolve these two issues screen shots are attached.
Thanks

Android WebView: Display only half of a webpage

Currently I have a HTML page with a container containing element A on the left side and element B on the right side. I'm trying to view this page using ViewPager with two tabs ie. have only half of the webpage displayed on Tab1 and the other half on Tab2. This makes it so that even if the user chooses to scroll all the way on Tab1, he can never see the content on the right side unless he swipes to Tab2. The size can be determined by 0-50% and 51% - 100% horizontally if possible.
Any idea how this can be implemented?
Android webview is a kind of browser, it will behave the same as another bowser is doing for showing webpage, as per your requirement ask your Web development team to make it browser compatible, and check their output in Chrome, Firefox browser in your device then integrate into Android Webview.

Webview can't render Virtual DOM and shows blank in SPA using Vue-CLI

I'm a web developer and don't know android programming.
my problem showed itself when I decided to lunch my single page app that created by vue cli 4 for mobile devices
actually I used this repository for build a webview for it:
https://github.com/slymax/webview
but I don't know that why does it show blank page? (I just know my webview can render DOM but can't render virtual DOM of my application.
because I tried to run my app with any browser and it worked but in webview I couldn't see my results)
any way...
where is my problem? If you need to check some config files like vue.config.js or something like that in my vue cli directory, please tell me.
I founded my problem! It's about my plugins in vue-cli like vue-hammerjs
It's not support webview platforms and after disable all of them in main.js, everything was going right.

Streaming PDF to browser, not working in mobile device

OK, so... I didnt notice the problem at first, i could stream my pdf as a byte[] directly to my browser and everything worked fine.
I realized the problem when I was going to try it in the browsers debug section -> under "toggle device mode", suddenly the pdf cannot be streamed to the
browser anymore(atleast, it cannot be displayed). Here's some of my code:
The PDF output (view_mypdf):
req.getResponse().setContentType("application/pdf");
req.getResponse().getOutputStream().write(delegate.getPdfBytes(), 0, delegate.getPdfBytes().length);
req.getResponse().getOutputStream().flush();
req.getResponse().getOutputStream().close();
My JSP with the iframe..
<iframe src="myurl/Controller?view_mypdf" style="height:300px; width: 300px;" name="iframeId" id="iframeId"></iframe>
I am not using any special CSS or JavaScript to do this, maybe i should? anyone has an idea why this doesn't work on a mobile device(google chrome) if it actually works on desktop in chrome?

How to render a web page with android jdk?

I want to show the web page normally,but still keep the user in my app,
how to make use of the available web render engines programmatically?
UPDATE
I'm now using the webview ,but can't render the page,reporting 404 page not found.
However,when I pack my project and run in another computer,it works like charm!
How to solve this?
Use a webview and implement webkitclient if needed.
More info here
Please explain your question. I cant understand that you want to open the webview with the URL or by the html code. Both of them is totally different. Please explain how do you want to open the webview in application by URL or by HTML
You, as of now, probably let your app open the device web browser to let the user see the content of the URL, via an Intent Action.
Use your activity which uses a WebView and implements its own WebKitClient. Then you can make the user stay in your app and control what and how content is fetched.
#Achie has a nice link for you which explains how Web things work in Android.
To know how to work with WebViews, go to this URL and read the nice article-cum-tutorial

Categories

Resources