Skip to Navigation | Skip to Content



Android Testing: The Emulator is your friend | October 26th, 2010

A while ago, I broke my Nexus One, and because I switched from Rogers to Telus back in February, I was unable to use my other Nexus One and I had to go back to using the Motorola Milestone as my phone. Now, I’m trying to look at the bright side of this is that I was forced to live like most users of Android, which is that I’m stuck using Android 2.1 (and while I’ll happily root a Nexus One and void it’s warranty, I’m a bit more sketched out by the Milestone’s Signed Bootloader, and would like a backup phone before going through the rooting process.)

This isn’t a huge deal with PhoneGap, except that I found a bug that was only in Android Webkit. The issue is that Motorola’s Webkit behaves differently than the stock Emulator Webkit, and that each phone Motorola implements has a unique firmware. That’s where the Motorola Developer Add-Ons came to the rescue. I was able to get Emulator Images that were roughly similar to my phone’s build, and was able to confirm the bug. Motorola really stands out with this tool, and it seems that after doing some initial checking, it seems that Samsung only has an emulator for the Galaxy Tab, and not for their other Android devices, HTC doesn’t even have an emulator and just offers source so you can patch the Android Open Source Project and generate your own images. Sony Ericsson has an Emulator for their Android 1.6 devices so if you need to test on the Xperia line, you can test on that as well.

The downside is that the Emulator is painfully slow in comparison to the device. Furthermore, most Emulator Images are still very unfinished, and others have annoying side features. They may be a custom boot animation, or random resolutions that aren’t supported. The Android Emulator is definitely the weakest link, and it would be great if we could rely on Android Webkit to be the same across all devices, and behaviours (like proxies) to work across all devices as intended. Unfortunately, life is not that simple.

Posted in Uncategorized | 5 Comments » | Add to Delicious | Digg It

This entry was posted on Tuesday, October 26th, 2010 at 7:44 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “Android Testing: The Emulator is your friend”

  1. François Petitit Says:

    Thanks for this very good article.

    About your last sentence: “it would be great if we could rely on Android Webkit to be the same across all devices”.
    How do you explain the differences on Webkit between the different devices?

    Thanks

  2. Shreya Says:

    Hi,
    Dont know if this is the right place to ask this..
    I trying to make a mobile website with html5.. the geolocation API works fine in Samsung Galaxy(Android 2.1 update1), but not in motorola milestone(Android 2.1 update1), I’m wondering if this is a bug..

  3. Shreya Says:

    I resolved it :)

  4. seb Says:

    How thoroughly is Phonegap tested on the various physical Android devices? Is there a list of the ones that have been tested?

  5. Joe B Says:

    Each vendor patches Webkit with their own improvements. Motorola’s own browser that they use has its own Java front-end that extends the WebView, and it has back-end C patches that support it. Other browsers have this too. Furthermore, there are compile flags that indicate that the browser will be using different Javascript engines depending on what device the Android image was built for. I’ll be working on an update post this week.

Leave a Reply