I have a page which contains some checkbox to mark as voting purpose. When opening this page using chrome and voting and after reopening its showing the correct state of checkbox mark . But when doing same thing using android webview its not working.
Can any one help regarding this.
I have already added code for cookiemanager.setAcceptCookie(true) and also cookieManager.setAcceptThirdPartyCookies(webview , true) but its not working.
Also after reopening in android webview and clicking on other component and coming back the change is reflecting.
Related
I have a CodeName One app where I'm using the BrowserComponent to load an HTML page. This HTML page (HTMLPage1) further opens another HTML page (HTMLPage2) on the click of a button using window.open(). This works correctly in the app. This HTMLPage2 has a Close button and on clicking this button, HTMLPage2 should be closed and the control should go back to HTMLPage1. However, this is not working as expected. On clicking the Close button, nothing happens in the app and HTMLPage2 is still shown in the app. I have tried using window.close() and self.close() and neither of them work.
I found the following article on searching
Android Webview: Scripts may close only the windows that were opened by it that seems similar to the problem I am facing
Also, I have a WebView Test app (can be found on PlayStore - search for com.snc.test.WebView Test) on my mobile that lets me modify the WebView settings and launch different URL's. I used this app to check if I can successfully invoke my HTML pages through the WebView Test app. With the default settings, I ran into the same problem as described above. The Close button didn't work.
However, then I modified the setSupportMultipleWindows() property in the app and set it to true. After that, it worked correctly through the WebView Test app. On clicking Close in HTMLPage2, that page was closed and I could see HTMLPage1 again.
So, I tried checking how to set this property in CodeName One. I found that the BrowserComponent.setProperty("SupportMultipleWindows", "true") should be able to do the same thing. When I set this property and tested the app, it still didn't work.
Then I looked through the documentation of
WebSettings.setSupportMultipleWindows
According to this documentation, if set to true, WebChromeClient.onCreateWindow(WebView, boolean, boolean, Message) must be implemented by the host application.
I could not find a way to do this through CodeName One.
Am I going down the right path to tackle this problem? If not, kindly guide me.
I've made an app where I display a map. On the same page I also have a button. When the button is clicked I want to display a modal page to enter some data. It works except from Android, where the app crashes when I do the navigation. It's this issue https://forums.xamarin.com/discussion/81768/launching-a-modal-over-a-page-containing-a-map-maps-ad-m-cannot-be-cast-to-android-view-viewgroup
So far I haven't found a solution that fixes the issue. I'm running latest XF 2.3.4.247 stable
best regards
I design new website using Joomla but this time I see something strange!
On any android device (by default browser (chrome)), it will show white screen if I refresh any pages of website.
please note it will happen only at "page refresh" events. I mean when you directly open the site with using address-bar and if you open links inside the website, it will show the page correctly, but if you refresh current page (with using "refresh button") you will see a "white screen" without any content.
I am sure that content is loaded correctly, because if you change the rotation of your tablet (or mobile) or if you tap white page and try to scroll down, website will appear!
seems there is several type of report for this problem:
https://superuser.com/questions/440416/chrome-displays-a-page-for-split-second-then-it-goes-blank
but I could not solve the problem with those solutions.
do you know any way to solve this problem?
Thanks
I got it
in Joomla by default jQuery is loaded. in Joomla 3.6.2 (that I am using), it's loading jQuery v1.12.4 by default that is stored in this directory: /media/jui/js/jquery.min.js
I just try to replace it by latest version, it solve problem but it create another one! in the console log I got a message that I can't use jQuery V3 because of bootstrap. then I downgrade to jQuery v2.2.4 (the latest version before version 3) and Hoooraaaaaaaaa, it's working now without any problem.
hope it help someone else
thanks
I'm trying to implement Chrome Custom Tabs but in my small example, everytime I launch a URL it asks me with which browser I'd like to open it.
I've seen some apps like Twitter official app where the Custom Tab opens without asking anything to the user. How can I achieve that?
Thanks in advance
EDIT:
I've followed this tutorial, so my code is 99% the same and the issue is the same in both codes.
I´ve solved the issue. I was launching the URL inside a RecyclerView when a CardView was clicked.
The problem is I was warming up the tab at the same time I was launching it. After changing that, everything worked fine.
I will release my second android application on Google Play soon.
But before relase I'm trying fix bugs.My application parse newspaper columnist article and show in application. I have 17 newspapers. Two of them bugy like same bug.
You see proggress dialog on middle. It's not mine application. It's mobile version of newspaper,Radikal...Although page loaded it is not disappear...This happen only my application and on tablet browser, there is no problem
This is Hurriyet newspaper's mobile version of site... It stuck like same. articles come after loading. But page stuck on loaded...
What problem can be ??
Note:If you want to see my application see, You can download it on omer-demirci.com/a.apk . After download click menu click gazeteler and you well see newspaper names click hurriyet or radikal
I solve the problem
Webview by default comes with JavaSript false.
enabled it and solved
webview.getSettings().setJavaScriptEnabled(true);