JQuery not working with android browser - android

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.

Related

mjpg link not rendering on mobile app when built using Meteor

I am currently trying to get a multi-image url to render in my app. It works when I am testing it out in the url, but when I deploy it on my android device it doesn't render at all. It shows that no image found icon.
I am able to successfully build it using Meteor and having Cordova build the mobile version for me.
Here is the url I am trying out for example.
<img src="http://193.85.239.147:86/mjpg/video.mjpg?COUNTER">
What I am particularly looking for is some sort of work around that could also render this similar to that of or some setting stuff I need to change.
I read that there is a version of Chrome that this bug is present, but the Cordova uses Chromium and I am unsure if the bug exist in that as well or not.
Edit:
Upon further test, when I build and use on android phone img won't render anything in which its src is a url/link. It renders properly when I use it in a web browser, but mobile it fails. This is an issue I have yet to figure out a work around.

how to debug to find out the reason why the website doesn't get displayed on android browser

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.

Does the internal browser phonegap uses update whenever the native browser updates on android?

I am experiencing a bug in our application and noticed that the bug is only happening in Chrome and the Native browser and not Firefox. Once I found this bug, I also noticed our phonegap application was now experiencing the same bug. I know that phonegap internally uses the native browser that android comes with; does this mean whenever the native browser is updated, the browser phonegap uses is updated as well? I guess I thought that it internally packaged its own version of the native browser and only through updating phonegap did this browser get updated. Is this not the case?
Thanks!
As it turns out, my inital guess is correct. Phonegap is using the Webview Class, which starting with Android 4.4 is now using the Chromium Engine instead of Webkit. This change is the root of my issue.
For those interested, my keyup and keydown events were not receiving the proper keycodes, which is a known bug in the Chromium engine:
https://code.google.com/p/chromium/issues/detail?id=118639

Problems with Android 4.1 loading external html using Phonegap

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.

how to debug javascript on phonegap/android 2.2

I'm writing a mobile marketing app, which is supposed to work on both iOS and android 2.2. The app is working just fine on iOS, but several things aren't working on android. It seems like some javascript responsible for handling button press events, with jQuery, is the culprit, however, to find the location of the error, I'm looking at the old-school equivalent of printline. Does anyone know of anything more convenient?
Don't dis the console.log, I've definitely found it to be useful with PhoneGap apps.
This page http://debug.phonegap.com/ gives you a rough equivalent of FireBug or Chrome's Developer Tools.
Follow the instructions to add the JS include to your page and run your app. You should then be able to use the console.

Categories

Resources