is WebRTC using JavaScript available in Android 4(by any means)? - javascript

I am trying to make a JavaScript demo of WebRTC work in an Android 4 device.
I have tried using Crosswalk, and following the examples, but getUserMedia would not return video. Are there any examples of a setup working anywhere? By my knowledge, Crosswalk support is available from 4.0(4.1 in newer versions), and there are plugins for WebRTC and getUserMedia so I assumed it would work.
Regarding the exact Android versions, I would like to find out the minimum version possible, with versions 4.4, 4.2.2 and 4.0 being of most importance, but am also interested even if version 4.x is not possible.

Chromium does not support Android 4.0 so CrossWalk decides to do not support Android 4.0 devices after version 20.
You can check this url to see more details.
https://crosswalk-project.org/blog/deprecate-40.html

Related

Android internet app doesn't render mobile website version properly

So the case is - when I run my website under Android Chrome, it's all ok, but when I open it up in the default "internet" app, it doesn't render some html markup and js is run only to some extent. I used the Aurelia.js framework for coding it. How can I debug this behavior? Is there a way to somehow see the errors in js console on Androids default internet app?
it depends on a version of android you're testing on
as google says
Since Android 4.4 (KitKat), the WebView component is based on the Chromium open source project. WebViews now include an updated version of the V8 JavaScript engine and support for modern web standards previously missing in old WebViews. New Web views also share the same rendering engine as Chrome for Android, so rendering should be much more consistent between the WebView and Chrome.
https://developer.chrome.com/multidevice/webview/overview
So if you testing on android version before 4.4 you may not test it on chromium based browser

why does an html5 app work differently in the browser than it does in Cordova (Android)?

Is there a reason why an HTML5 app that works fine in browser would work differently when compiled with Cordova for Android?
Does cordova not support all the same things as the browser?
Im mainly thinking of / referring to the way JavaScript works.
Cordova itself does not handle the presentation layer of an application. Cordova creates a basic, single view, native application wherein the single view is a webview. A webview is native to the platofrm/SDK that the application is implemented in.
Because webviews are packaged with the SDK, they are not updatable like the browser that is on the device. This means that code you create may run just fine in a browser on the device but may not run in the native webview. Additionally, your code may work on a newer version of the platform/SDK and not on older versions.
If you are experiencing an issue with a particular item being used in a webview, it is best to look up the capabilities of that particular webview from the platform/SDK version you are seeing issues with.
An example would be using the latest version of Cordova to build an Android application making use of canvas elements. If you deploy the application to a device running Android 5.0 you will have no issue, but if you deploy the same application on a device running Android 2.3.4 your application will appear to not function. This is not because of Cordova, it is because of the capabilities of the webviews in the various platform/SDK versions.
One way to try and safeguard against these types of issues is to make use of a framework. The reason being that most frontend frameworks have builtin fallbacks for compatibilities with various versions of webviews/browsers/etc.
Because Cordova uses the native browser view. Some JS implementation can differ from Chrome, Firefox, and so on.
That's mainly for security reason, or for webview itself (depending of the platform) you may have some limitations or differences.

Which underlying Browser does PhoneGap use on Android?

Since PhoneGap runs an html page in a native app container, I suppose I require some kind of browser to do that.
Which underlying Browser does PhoneGap use on Android? Is it the default installed browser or does phonegap has its own? Or is it Chrome?
Phone Gap (Cordova) currently uses the standard Android WebView which is a stripped down version of a browser (based on a particular version of WebKit).
It can't really be the Chromium-based WebView yet, that was just made available as a component to third party developers only recently in Android 4.4.
And as of April 1st 2014, Android 4.4 (KitKat) constitutes only about 5.3% of all the Android versions (not to mention, this new Chromium-based WebView still seems to be a work in progress, so it will take a while for most third party developers to feel completely comfortable with it).

javascript not working on native android browser

I am part way through developing a mobile web app which contains almost no HTML elements. JSON2HTML is used to create HTML elements.
My problem is that it works ok except for on
iPad
Android 4.0.3 Native browser.
The problem with these browsers is that the content isn't being rendered.
It works fine on
Android 4.0.3 Chrome,
Android 4.0.3 Firefox
Android 4.0.3 Opera
Android 4.0.3 Dolphin
Android 4.1.1 Native
Android 4.1.1 Other browsers
Just to clarify, this is a mobile web app, not a native mobile app. I am not using any native code, I am using standard web technologies (HTML5, CSS3, jQuery, Javascript, JSON)
After days of research and testing, I have found the solution.
First I activated the built-in debugger on my Android phone - instructions at http://tinyurl.com/768qltl
The debugger then told me that the error was at line 71 of jquery.json2html.js
I opened jquery.json2html.js
I replaced line 71 with the following code
else $.fn.append.call($(this),$(dom).children());
This works because the previous line 71 was calling the jquery append.apply function, which only works with specific data type on older browsers.
Your best bet would be finding a way to remotely debug what's happening in the native browser. There are a couple ways to do this.
Install an app like JsHybugger, which acts as a reverse proxy
Add some new JavaScript to the source page and use Weinre, JSConsole, or to attach remotely

What version of mobile safari comes with each version of iOS?

I'm trying to figure out what Javascript APIs I can use to achieve support for Mobile Safari back to iOS2. I haven't found a list anywhere that shows what version of Mobile Safari ships with each new version of iOS. I'm looking for a comprehensive list that goes all the way back to iOS2.
Thanks!
[Edit: Yes, I know and love feature detection. However, I have a set of targeted browsers I need to support, and I just need to verify that the fallbacks I provided cover my target audience and that I don't need to provide additional fallbacks that are cumbersome hacks).]
Since this is already the top hit on Google, we should start a list here. I'll make this answer a community wiki. By the way, I'm pulling these from the device's user agent string. Browser version is iOS version dependent, NOT device dependent. But when a phone doesn't support higher iOS versions it is listed:
3.2.2 - Mobile Safari 4.0.4
4.3.3 - Mobile Safari 5.02 - iPhone 3g
5.0 - Mobile Safari 5.1
5.1 - Mobile Safari 5.1
6.0 - Mobile Safari 6.0 - iPhone 3gs
7.1 - Mobile Safari 7.1 - iPhone 4
8.3 - Mobile Safari 8.0
9.2.1 - Mobile Safari 9.0 - iPhone 4s
10.3.4 - Mobile Safari 10.0 - iPhone 5
11.2.5 - Mobile Safari 11.0
12.1.4 - Mobile Safari 12.0
12.4.4 - Mobile Safari 12.1 - iPhone 5S, 6
13.0 - Mobile Safari 13.0
[...] - [...]
15.2 - Mobile Safari 15.2
This guy's list is really useful: http://www.somegeekintn.com/blog/stuff/iosvers/
If you need the additional info, you can decode the Safari versions on useragentstring.com, e.g:
http://www.useragentstring.com/Safari5.0.2_id_18120.php explains that Safari version 6533.18.5 is known as "Safari 5.0.2"
I couldn't find a comprehensive list either. The best thing I've found so far is some Safari documentation from Apple:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html
Good luck!
[Update]
While this still doesn't answer the question it at least tells when WebKit added support for getBoundingClientRect() in Febuary of 2009.
http://trac.webkit.org/changeset/40837
Rather than doing device or os detection, you should be doing feature detection -- it'll provide a much richer experience, and you can provide custom code to add functionality that the specific version doesn't support. This way you'll provide support way beyond the specific devices you're targeting (and it usually ends up being easier since rather than branching your code for a specific user-agent, you're back-filling support for older js implementations by providing forward-looking support on a conditional basis).
For example, the latest version of desktop & mobile Safari do not provide .bind() functionality to bind a context to a closure. This can be detected and handled using Function.prototype.bind and if it doesn't exist, providing an implementation that provides the functionality to older browsers. Using a library like http://www.modernizr.com/ will assist greatly in this endeavor.
That being said there are some specific DOM events which are tied to certain versions of iOS:
http://developer.apple.com/library/safari/navigation/#section=Libraries&topic=Safari%20DOM%20Additions%20for%20iOS
If there are specific API's that you are looking at, caniuse.com is a great resource for finding out how far back the API has support.
Good luck with it!

Categories

Resources