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 ?

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
  • 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 sux – max4ever Sep 13 '12 at 16:24

3 Answers3

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

JT703
  • 1,311
  • 4
  • 17
  • 41
1

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

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

Community
  • 1
  • 1
Michael Celey
  • 12,645
  • 6
  • 57
  • 62
  • Unlikely. Google-Chrome does this, and there it displays well in Google Chrome. Google Chrome is not the default browser. – Stefan Steiger Sep 13 '12 at 16:34
  • 1
    Android's browser has used webkit since very early on: http://www.webkit.org/blog/142/android-uses-webkit/ – Michael Celey Sep 13 '12 at 16:36
  • 2
    Just because they both use webkit doesn't mean they are on the same version of webkit... unfortunately. – xbakesx Sep 13 '12 at 16:45
  • @Quandary Here's the source code for Android's Webkit implementation. Maybe this will help solve your problem: https://github.com/android/platform_external_webkit – Michael Celey Sep 21 '12 at 15:43
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

xbakesx
  • 13,202
  • 6
  • 48
  • 76