Anchor links are not working in android - android

Web links are not clickable in android chrome and firefox. But in Opera it is working. It is created with Twitter bootstrap :
http://questionfriends.com/

Even in computer if you resize the browser to minimum width the links doesnt seem to work. It has something to do with the scalfolding javascript that is making the links as simple "#" .
While if you maximize it on desktop the link seems working. Some scalfolding code is removing the hyperlinks with dummylinks. Just check if any javascript is doing it,

Related

Angular 7 website crashing on android WebView when linked from Facebook/Instagram

I have searched through all sources I could find and tried everything, but can't seem to find a solution. I have a website (Angular 7 form) that runs perfectly on all devices and all browsers BUT when I posted a link on Facebook, on Android phones it opens in Facebook's WebView browser and crashes when hitting the first button or when pressing the three dots in the browser corner. The WebView browser works well on some Iphones, but some have the same issue. Also the css stylings are not similar, the background is not covering the whole device and button is almost not visible. I tried posting a link straight to the other pages on the site, and always when navigating to next page on the router or tapping basically anything on the page, it crashes.
Some testers claimed that they could make it to the third page (out of 8), and then it crashed.
I've read about fixes and tried the following:
Removed Google Tag manager script, since it was inside an Iframe
Changed CSS styling so that there are no width/height values in
pixels or percents
Added viewport meta tags
Checked that all URL:s are https
Removed target="_blank" from a link on the last page
Changed CSS styling so that positions are absolute
Is there something else that the WebView doesn't support? Where do I find this information or should I just keep guessing? Is there a way to debug the WebView somehow, when it's not my own app's WebView but Facebook's?
Thanks in advance, this is such an annoying problem! Unfortunately this website is the kind that will be published through social media.
So I finally solved this (workaround), with only one line of code. My workaround is to redirect the user to an external browser, when it tries to open in Facebook's or Instagram's In App browser.
I detect if it's FB or Instagram and then run this line of code in the html:
<meta http-equiv="refresh" content="0; url=intent://YOURURL#Intent;scheme=https;action=android.intent.action.VIEW;end;" />
Hope this helps someone, these In App browsers seem to be a real pain!

Android WebChromeClient with nanvigation

I am trying to create an app that has a Webview to view a site (with full navigation). The problem is the site requires Chrome. I tried setting the user-agent but that did not work.
In order to get around this I used
webview.setWebChromeClient(new WebChromeClient(){});
This was able to bypass the sites browser check.
The problem I have now is I cannot seem to navigate the site without it opening the default browser app.
I tried using the WebChromeClients onRecievedTitle method but with no success.
Is this even possible? If so, can anyone point me in the right direction?

Phonegap disable x-frame-option in webview

i have a problem that is when i open a site like facebook.com in iframe in my phonegap app don't open because x-frame-option.
my question is can i disable checking x-frame-option from java code of cordova webview ?
or use another webview in the same activity one it top and on at down and change the url of webview ?
i'm not good on phonegap and not good in android please help me :D
Thanks all
I found the great solution in this amazing plugin
https://github.com/Wizcorp/phonegap-plugin-wizViewManager
you can add a webview to android and ios and select it position it's really great.
I would assume it isn't possible to allow it on Cordova because it is up to web view of device to handle. What you probably could do is to first download the HTML for some page with AJAX query, strip the
<meta http-equiv="X-Frame-Options" content="DENY" />
of from there and then inject the whole content into iframe. Of course this only works for single page but if that is SPA (single-page application), it might even be enough.

Android browser $(window).scroll not working

I have a mobile website using jQuery and it $(window).scroll evenet. This works perfectly in Chrome and Safari Mobile, but Android native browser is showing me the middle finger.
I have this simple code:
$(window).scroll(function() {
alert("Scrolled");
}
But this alert never appears. I've done alerts in other parts of code, so alert are enabled and I extensively use jQuery so it's also loaded.
I am not sure what's going on here, am I missing something or is this a bug?
It's a bug or limitation in the Android browser, the built-in browser in Android is a lightweight version browser, so some features are not compatible
Simply use:
$("html:not(:animated),body:not(:animated)").animate({ scrollTop: 0 }, 400);
this will scroll you page to the top.
you can set "scrollTop: " value to set it to any specific TOP position.
dont forget to vote up.
:)
thanks

Android webview to work like native browser

I experimenting with WebView in Android and I can't figure out how to make it work like the native browser.
I have an example for this:
Go to deviantART.com in native browser. Press Menu button. At the bottom of the menu there will be a link to disable mobile view and it works as expected. This exact same thing doesn't work in WebView. It simply turns the menu off and that is all, mobil CSS still stays intact.
I need to make users disable deviantART's mobile CSS, so I need the WebView to work like this.
JavaScript and DOMStorage are enabled.
I need the proper code or an workaround, but after hours of searching I didn't find anything that connected to this problem.
Thank you in advance.
If all you want is to turn off the mobile view you can set the user-agent string on the WebView using setUserAgentString (String ua).

Categories

Resources