We're facing a new and peculiar problem when using a simple Select drop down in a hybrid app in Android Webview after the latest update (50.0.+).
Behavior of the select drop down: Blinks twice and opens the Android options list. Upon selecting an item, it doesn't show that item selected - No change in the displayed list.
When we downgrade the Android System Webview to factory settings (v46 or v37), the select box seems to work just fine.
Is anyone else having issues with similar html components and current Android Webview??
We do use JQuery Mobile v 1.4.5 in our app.
And yes, javascript is enabled on the webview.
Yes, the problem is different devices have diffenent Android versions and Webview versions.
There is a PROBLEM on webview version 50,51,52, that when I use Webview.loadUrl, it won't work until I touch the Webview once or Twice.
And then, I replace Webview.loadUrl to Webview.evaluateJavascript hoping to solve the problem, but it didn't work neither.
After I upgraded my Webview version to 53 through Google Play, the Problem was solved. But it doesn't make sense.
CrossWalk Engine will add about 20MB to the APK size, so it won't be my first choice.
Related
I am in the process of testing a hybrid app for Android 4.4+. The app consists of
one custom plugin (my own effort)
the HTML UI created using Phonon.
Phonegap CLI v 6.4.2
My test device is a Huwaei Holly running Android 4.4.2
One of the issues I have run into is the fact that the caret in textarea and input controls stops working "after a while" and the soft keyboard does not popup when I tap the control.
By dint of some trial and error I pinned down the problem - it happens AFTER the app has displayed at least one vanilla HTML/JS alert box which I am using for my own debugging needs. Replacing that with a Phonon.alert box - which is simply an overlayed layer of HTML, not a new window as, I imagine, the bog standard alert is - "fixed" the problem.
Very good but the fact that this happens at all still bothers me - I will not use vanilla alerts in my release build but if it happened with alerts it might well happen with something else.
A spot of Googling revealed that is a known issue that appears to have been around for a while. This SO thread, for instance, suggests the Webview has to be set as being focussable and I have run into the same suggestion elsewhere too.
However, it is not at all clear to me just where I should do this. About the only configuration locations I have at my disposal are
The config.xml file for my Phonegap/Cordova project
The plugin.xml file for my custom Phonegap/Cordova plugin
The Phonegap docs related to config.xml do not mention anything about FrameworkLayout, android:focussable etc.
I'd be most grateful to anyone who might be able to either
explain just where the android:focussable bit should go or
suggest the root cause of the problem.
On Android 2.x, I cannot get Bootstrap modals to work. They open properly, but then they will not scroll if they are larger than the screen. And you can't click on any of the buttons to close the dialog. Basically, it opens and displays properly, but is completely dead in the water in terms of interacting with the modal.
Bootstrap has no interest in fixing it as they don't support older Android versions. But, I thought there simply HAS to be a way to make it work, right? But apparently not.
I have tried the following hacks, and none of them work. They're all at least a year old, so perhaps they applied to Bootstrap 2.x, but they aren't working for Bootstrap 3.
https://github.com/twbs/bootstrap/issues/8975#issuecomment-24804826
https://github.com/twbs/bootstrap/issues/9890#issuecomment-22915234
https://github.com/twbs/bootstrap/issues/5589#issuecomment-9745069
https://github.com/twbs/bootstrap/issues/3230#issuecomment-5629022
And so on...
Does anyone out there have a solution? Or do I have to use a different modal component? I'm required to support all versions of Android for this project, regretfully.
I'm having some trouble getting TalkBack to work with a web view (testing with a Nexus 5 on Android 4.4.2). I read that TalkBack support was added to web views around the release of Android JellyBean by checking a preference titled "Enhance Web Accessibility." I can't for the life of me find this preference in the system settings.
Focusing on the web view in our application simply reads "WebView" and provides no other options. I've made sure and called getSettings().setJavaScriptEnabled(true); on the web view.
Was TalkBack support for web views removed in KitKat? If not, what am I missing here?
On 4.4, you need to have TalkBack/Explore by Touch enabled on the first run of your application. If you enabled it after that, it never seems to work. I figured this out by trial and error. I suspect scripts are being injected into your app/WebView on first launch to support it.
As an alternative, you could manually inject the ChromeVox scripts into your WebView and enable accessibility that way. Check out how the PhoneGap plugin does it - https://github.com/phonegap/phonegap-mobile-accessibility
I'm unable to transition from index.html to any pages correctly. All transitions would show an almost empty page with LogCat showing:
"E/libEGL(17550): call to OpenGL ES API with no current context (logged once per thread)"
My code does not contain any video tag or anything like that. All pages work well if I set them as default page in super.loadUrl();
I've also tried on Android 2.3 it still have the same issue. I'm using PhoneGap1.5 and JQM 1.0.1.
Several others have reported the same issue and am wondering if there is any solution to this.
http://forum.jquery.com/topic/cannot-change-page-in-android-3-2-1-honeycomb-jqm-1-1-0
https://groups.google.com/forum/?fromgroups#!topic/phonegap/UNDY3cAJH34
[Update]: I tried a separate project in Aptana without PhoneGap but just JQM. The problem still exists. It seems now is the problem of JQM itself.
problem solved. It is due to JQM's ajax paging behavior. When I disabled the ajax, everthing works fine now.
I just upgraded to PhoneGap 1.0 and jQueryMobile Beta 2 and it seems like file:// navigation is totally borked. I've posted a super stripped-down 2 page example for Android 2.2 here: https://bitbucket.org/uhlenhuthm/pgdemo/overview
DETAILED PROBLEM DESCRIPTION:
I've created a very simple 2 page test application in PhoneGap 1.0 for Android. In my assets/www folder, I have two files: index.html and hola.html. PhoneGap loads the index.html file which contains a single button (see below). Clicking on the button SHOULD load a new page (no AJAX loading), but instead the button just changes color while being tapped and nothing else happens. This only happens when the link has data-ajax="false". Setting data-rel="external" actually has no effect and JQM loads the page using AJAX (another bug). AJAX loading works fine, but that's not what I need (for a more complex project). Including the phonegap.min.js file doesn't fix the problem either.
The weird thing is that this works in the browser (not going through PhoneGap on the phone, it goes to hola.html no problem). Maybe there's something weird with how JQM and PhoneGap deal with file:// URLs?
Am I making a bonehead mistake or is there something really wrong here?
Attempt to give this a read. He points out many different issues with upgrades, this being one of them. Here is a quote detailing what probably is causing this issue: "If you are unable to open a second html page in your app then you're missing the following tag which should be placed in the application tag of your apps AndroidManifest.xml:"
<activity android:name="com.phonegap.DroidGap" android:label="#string/app_name" android:configChanges="orientation|keyboardHidden"><intent-filter></intent-filter></activity>
I hope this helps!