I have an Android application working with the latest version of Phonegap and Jquery Mobile. I haven't had any problems on Android 4.0.1 or below, but when I installed the app on Android 4.1, I got one issue. There is a section on the app where I have a XMLHttpRequest to load an external HTML. For some reason, on deviceready, the application gives me an alert telling me that the app cannot load the HTML. I don't know what's wrong. Any idea what's the problem? Why is it only happening on Jelly Bean?
#User1608382,
Like Simon said, show us your code.
If you don't want to show us all your code, just strip out as much of your code as possible, try it again to see if you can reproduce the issue, and give us that minimal test case that still has the problem. A number of us have actual 4.1.1 devices we can test on.
Does DeviceReady even give you access to logcat? Since the service is still by invitation-only, I couldn't immediately browse its documentation.
Also, go to the bug tracker at b.android.com and search for 4.1 webview
As you can see from those results, Android 4.1.x introduced a couple of problems for WebView, so hopefully your problem is listed in there already.
Related
I am doing some tests and realised that android browser does not display my website. The other browsers are ok.
I used these libraries:
easeljs
mathjax
jquery
I also used html5 webworkers. This is my test website: thewebdesign.org/v16/
My question is:How to find out the reasons.
Take a look at https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging to be able to inspect the chrome console.
Hope it helps.
Remote debugging is the most accurate / best, as suggested above, but if you are not able to use remote debugging: You can try out browserstack (http://browserstack.com/). Even though you would fix the android issue, there are no guarantees, IOS works. That is why I have been using browserstack, to test IOS.
I have created an app using phonegap. The app works fine on all android versions. But the file upload feature on this app does not work on Android 4.4.2. I have googled a lot on this issue, and all I have found is that Google has disabled this feature for Android 4.4.2.
Is there no work around at all? I am really in need of a solution to this problem. It would be great help if someone can suggest a solution to this issue.
There's no chance to get file uploads working in a WebView on Android 4.4.2.
Nevertheless, the onclick or onchange events are still fired on the <input type="html"> element.
This means you can either get the file there via JavaScript or call a Java method from those event handlers and do the file upload manually.
For Cordova, there's an issue here:
https://issues.apache.org/jira/browse/CB-5294
... and a workaround here:
https://github.com/cdibened/filechooser
I have created an app with PhoneGap 2.0.0 for Android on Eclipse but when I try run the application either on an emulator or my phone(signed application with no errors) it only shows up the static html pages. When I go to a page where I have used iFrame to load another webpage into it, it simply crashes.
This is the screen I get on the emulator and the same message is displayed on my phone as well(SE Xperia X10)
Screenshot of Emulator with The error :
After showing the message the app crashes instantly. Please let me know if I need to add any other permissions or add other settings or make any changes for this to function because the iFrame functions properly outside Phonegap on browser(including phone/desktop browsers)
At least some versions of PhoneGap use an iframe to communicate with the native layer.
I'm most familiar with the iOS version, where there are definite bugs in the browser's support of iframes ( https://issues.apache.org/jira/browse/CB-593 ). I don't know if there is a similar system level issue on android, but there could easily be some part of your code that doesn't expect that second iframe to be there.
I have been using jquery for my web development for a while, and when i use android browser to view my work, i find out that all the jquery function like hide() show() doesn't seems to work.
Can anyone validate this for me, I wonder why jquery is not working for android browser, I am using 2.3.1 right now. Does anyone come across with this problem before?
jQuery works just fine in Android browser. The problem isn't that jQuery doesn't work in Android. The problem is something else.
It's hard to say what that problem might be without any code, but you can try to get more hints as to what might be going wrong by looking in the JS error console (or whatever the equivalent is in Android or an Android emulator--basically, where JS errors are logged).
If you want to get super ambitious, you can try debugging it with Weinre or something like that.
Since you did not post code, we do not know if you were loading your JS assets from the same domain or not. After putting jQuery on the same server instead of using a CDN it resolved my issue. I also had other random JS errors and then I cleared all the data/cache for Chrome and that fully resolved it.
If the issue is something else, you can follow the instructions here to do remote debugging on any of the JavaScript errors:
https://developer.chrome.com/devtools/docs/remote-debugging
Jquery current browser support on desktop and mobile: https://jquery.com/browser-support/
So seems the problem is not with jquery support for native android emulation, since Stock browser on Android 4.0+ is supported by. Any problem with jQuery in the above browsers should be reported as a bug in jQuery.
I'm just started looking at developing apps. I have made some of the tutorials (HelloWorld), but when I try to make a WebView app following the tutorial for that it won't work. Each time I run the app on my phone I get the "Force Close". I use eclipse. I'm sorry that i cannot be more specific - but my point is that my knowledge doesn't go further than failing in a tutorial.
Because of me huge lack of knowledge about developing I would be grateful if anyone would like to help me developing an app for android phones, using webview to show www.lectio.dk.
Christian.
If you're specifying Android 2.3 as the Target Name, the WebView example won't work in the emulator. See http://code.google.com/p/android/issues/detail?id=12987. A workaround is to specify Android 2.2.