Where is the default browser on Android 4 derived from?
Asked Answered
E

3

6

Question:

Where is the default browser on Android 4 derived from ?

The user-agent string only contains Safari, not Chrome.

If I go into android-market, and download and install Chrome, Firefox and Opera Mobile, then my website displays well in them.

It also displays well on Safari, Internet Explorer (9+8), and on the iPad (on the iPad only after much work).

But it looks horrible in the Android 4 default browser. And what's worse, I can't do anything about it:
I can't debug on the android device, I can't install a USB driver for remote debugging (I have no admin rights on the corporate laptop), doing anything in the android emulator is impractical because it is far too slow, and the fact that it doesn't take input from the computer keyboard, which means I have to use the mouse and type each character separately with the mouse on this horrible keyboard is just the tip of the iceberg.

The default browser also seems to not contain any kind of developer tool, where I could look at styles or a JavaScript script console.

I have not found any type of standalone browser or emulator so that I can run that horrible thing on Windows or Linux natively, so I could actually debug the LAYOUT (not the javascript).

When I look at the browser process, it says:

com.android.browser

which looks like a Java namespaces to me.

Is this horrible thing derived from a Java rendering engine ?
If yes, which one, and does there exist a Java browser using this engine that I could run ?

Extraordinary answered 13/9, 2012 at 16:8 Comment(1)
if you use the x86 images of android 4.0.0 in the emulator(you just have to click and download it, then select x86 instead of arm) it runs faster than a tablet with a good workstation, the keyboard input used to work in the emulator on some android 2.X, but yeah it suxWestern
T
1

The default Android browser uses the WebKit render engine and the V8 JavaScript engine.

https://android.stackexchange.com/questions/4271/android-browser

Tokyo answered 13/9, 2012 at 16:30 Comment(4)
Unlikely. Google-Chrome does this, and there it displays well in Google Chrome. Google Chrome is not the default browser.Extraordinary
Android's browser has used webkit since very early on: webkit.org/blog/142/android-uses-webkitTokyo
Just because they both use webkit doesn't mean they are on the same version of webkit... unfortunately.Paestum
@Quandary Here's the source code for Android's Webkit implementation. Maybe this will help solve your problem: github.com/android/platform_external_webkitTokyo
V
3

Every version of Android has a "android browser" that uses a cut of the WebKit rendering engine. Also, the Android Browser that lives in the AOSP v4.4 (kitkat) is based on the same code as Chromium v30.0.0. Applications that use WebViews use this Android Browser (not the user's default browser).

enter image description here

https://developer.chrome.com/multidevice/webview/overview http://decadecity.net/blog/2013/11/21/android-browser-versions

Voidable answered 30/4, 2014 at 15:18 Comment(0)
T
1

The default Android browser uses the WebKit render engine and the V8 JavaScript engine.

https://android.stackexchange.com/questions/4271/android-browser

Tokyo answered 13/9, 2012 at 16:30 Comment(4)
Unlikely. Google-Chrome does this, and there it displays well in Google Chrome. Google Chrome is not the default browser.Extraordinary
Android's browser has used webkit since very early on: webkit.org/blog/142/android-uses-webkitTokyo
Just because they both use webkit doesn't mean they are on the same version of webkit... unfortunately.Paestum
@Quandary Here's the source code for Android's Webkit implementation. Maybe this will help solve your problem: github.com/android/platform_external_webkitTokyo
P
0

I think you are limited in your options for debugging (or I haven't found a great solution). The best I've found is looking at the page in your browser on your device/emulator and in Chrome/browser of your choice at the same time, and make educated guesses about what is different and why, manipulate things, refresh, start over.

To get your Android 4.x emulator to not be a huge bummer, you can install the Intel x86 System Image and then create a new emulator using that. If you're using Eclipse just:

  1. open up your Window > Android SDK Manager.
  2. find "Intel x86 Atom System Image" under each version of Android (4.1 and 4.0.3, there's also a 2.3.3 one I think)
  3. check boxes, install packages, agree to terms, all that fun stuff.

enter image description here

Paestum answered 13/9, 2012 at 16:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.