In my Android app, I have a Webview and an html file(html tags + javascript code) is loaded in this Webview. That .html file includes jquery(v2.1.3) and bootstrap(v3.3.7) scripts. Though Webview works fine on Android devices with Lollipop installed in them, it is not working for devices with Kitkat or JellyBean installed on them.
Ex- html list Items aren't clickable in older versions.
I couldn't find anywhere data on compatibility between jQuery,bootstrap and Android Webview. Can someone please help?
The minimum SDK version for the app is 16.
KitKat's WebView is a mess. (https://groups.google.com/forum/#!topic/phonegap/1ZxXe6chHZc) It's because canvas hardware acceleration is not enabled in the underlying chromium component.
Few guys were successful by invoking
mWebview.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Related
I know this has been asked before but those questions are pretty old now.
I have a "game" that I developed some time ago with WebGL and I want to bring it to Android with a simple WebView.
The problem now is, that it won't really respond to the user input in the WebView (Chrome works just fine. Android 7.1.1) . I guess that's because of WebGL.
So now, as the crosswalk-project has ended a while ago I am searching for an alternative to run WebGL in my application. Or somehow just run my "game" in an Android App.
Do you have any idea of how I could bring it to work?
From 5.0 Android comes with Android System WebView which is being updated and we might call it the Native WebView. WebGL should work there although some of WebGL extensions and WebGL 2 (stats) might not.
The key to make your game work as an application is following.
First you must identify what WebGL version, WebGL extensions, WebGL or Shader capabilities and other HTML5 functionality your game (and the game engine you use) requires.
Then you must find a WebView that supports that functionality. You can simply do that by opening webpages https://html5test.com/ and http://webglreport.com/ with the WebView you want on your Android device. IMPORTANT! If you for example open the webpage with installed Chrome browser, it doesn't guarantee the Native WebView is used! So it is better to write a small custom application to make sure you are testing the WebView you want to use for the game.
In the end you will probably end up with compiling your game in application with custom WebView which will add an additional size to your game.
Other useful informations
Android versions < 5.0 has a Native WebView that doesn't come with updates so it doesn't support WebGL and this will not change. But the Chrome browser (or other installed browsers) is likely to support WebGL there, because it comes with custom WebView.
Samsung really messed up. I mean it, they are customizing Android OS a lot including some black magic with WebViews => Native WebView doesn't work there properly, so custom WebView in your application is must.
We (GAMEE) are using the Native WebView and XWalkView for Samsung and Android < 5.0 and WebGL games are working just fine right now.
I have create one Android app using android webview. I am using jQuery mobile. I am also using Admob and javascriptInterface in that. The app is working fine in Android 5.0 and higher, but it is opening and stucking on pageload in lower versions of Android.
I have set minimum API level to 15 and max to 26.
What could be the possible reason for this?
Thanks in Advance!
I found the solution for this problem.
WebView in 4.4 or lower versions of android does not support CSS animations, that caused my page to stuck.
So, I used -webkit- vendor prefix for chrome, then it worked fine.
I'm trying to inspect an app in Android 4.2 and 4.3, i'm able to inspect this devices using chrome (https://developer.chrome.com/devtools/docs/remote-debugging), but I need to test this on Webview, i didn't find a solution.
Some css are rendering different from newer versions of Android. HTML5 and CSS3 are suported in Android 4.3 webview ??
Currently there is no straight forward way to debug . one solution is to override the onConsoleMessage[which is used to print console statements],onJsAlert [used to show the alerts] methods of WebChromeClient attached to that webview ,get the logs and alerts , based on that upto some extent we can debug. Hope this solution helps you.
All,
My webpage contains html5, it is OK on ANDROID 4.4, while something wrong on ANDROID 4.3.
After google it, I found
Android 4.4 update the webview.
Is it possible to use new webview on ANDROID 4.3(or 4.X)?
No, not directly.
You may like to investigate the XWalk Project[1]. However, some things to be aware of:
it is not a drop in replacement for WebView. Some APIs are missing or work differently
there is a significant increase (~25MB) to your APK size, and RAM size will increase too.
[1] https://crosswalk-project.org/
I am working on a cross-platform application developed using html5, css3 and angularJS.
I am facing an issue in showing the ScrollBar on android device.
I have used -webkit-overflow-scrolling: touch;
It is working fine on iPAD but its has no effect on android device.
Need help.
Thanks in advance
As you have rightly said, Android native WebView does not "show" a scroll bar when using overflow:scroll|auto. But the scrolling is allowed when you touch and move the container around. So scroll should still work as expected, without the bouncy effect.
Another Android catch is till 4.4, the native WebView is not the one used in Chrome, i.e. ChromeView. So you are going to have to deal with it by using a javascript polyfill, like overthrow.js [http://filamentgroup.github.io/Overthrow/] or iscroll. Personally, iscroll ux sucks on Samsung Galaxy Tabs.
But if you are targetting Android 4.0>=, then this might help https://github.com/pwnall/chromeview. Haven't personally tried it though.
Check out for more details on webview changes https://developers.google.com/chrome/mobile/docs/webview/overview
Android 4.4 (KitKat) includes a new WebView component based on the Chromium open source project. ...[truncated]...., so rendering should be much more consistent between the WebView and Chrome.
As of this writing, -webkit-overflow-scrolling was exclusive to Mobile Safari on iOS 5 and later.
As of mid-2012, the latest Android version (4.1 Jelly Bean) does not support it, but it IS supported in Chrome for Android, which can be downloaded from Google Play (and only supports Android 4.0+). Android 3.0+ supports overflow: scroll, but it's not very snappy.
Referred from : How much support is there for -webkit-overflow-scrolling:touch