Android Browser Testing with the Android SDK & Emulator

It’s becoming increasingly important to be able to test your website – be it a standard version, responsive or a mobile specific version – on multiple devices. All of the major smartphone makers use Webkit (the basis of Chrome & Safari), except, of course, Microsoft.

Quite often websites will display the same in Google Chrome as they do on Android. However, sometimes they do not. Also, sometimes interactivity needs to be tested to see just how well it works on a touchscreen. Using the Android SDK helps you do that without having to have a huge range of devices with multiple versions of the Android OS at your disposal.

Step 1: Downloading and Installing the Android SDK

Download the SDK from the Android developer site
Read the Installation instructions – the page will change depending on which OS you use it for. I’m on a Mac, so I see the Mac instructions.

Personally I put the unzipped folder into my /Applications/Utilities directory.

Step 2: Preparing the Emulator

You’re going to notice there aren’t any applications you can just double click on and have them work. For non-Windows users, you’re going to be working inside the tools directory as well.

Windows: double-click on the SDK Manager.exe in the main Android SDK directory.
Mac or Linux: You will need to use the Terminal to start the emulator. Then you need to type ./android sdk from within the tools directory.

Step 3: Creating an “Android Virtual Device” (AVD)

- In the window, on the top right there’s a button for New… Click that
- Give it a name, and choose a Target – this is the version of android you want to use. I chose 2.3.3 as it’s very common right now. 4.0.3 is also becoming popular, so if you’re reading this a few months after publishing, I’d go with 4.0.3. (I currently use both.) You can also check for  the current Android version marketshare.
- Set the resolution. I chose WVGA800
- IMPORTANT: Under Hardware, click New… and add Keyboard support. Then set the Value to Yes. Otherwise typing will be a pain :) This will allow you use your computer keyboard with the Android SDK emulator.

Step 4: Start the Android Emulator

With the Android Virtual Device Manager still open, select the device and click Start… leave the settings on the next window as their default settings, then click Launch.

Step 5: Login and Launch the Default Android Browser

You will need to click and drag the lock icon to the right to login. After you do that, click the globe icon to launch the web browser.

Chances are you’ll quickly want to rotate the screen into landscape view, and there’s not a single UI element to help you do this (unlike the iOS SDK.) There’s several keyboard commands which may help you, including rotating the screen. They’re here http://developer.android.com/tools/help/emulator.html#controlling

Switch to previous layout orientation (for example, portrait, landscape)

KEYPAD_7, Ctrl-F11

Switch to next layout orientation (for example, portrait, landscape)

KEYPAD_9, Ctrl-F12

2 thoughts on “Android Browser Testing with the Android SDK & Emulator

  1. Tucson Car Accident Lawyer work hard for all your complicated injury cases.
    However, in order to ensure you receive these benefits, you ought to
    keep a few points in mind when deciding on the lawyer.
    To learn more about selecting the right Milwaukee personal injury attorney, go to.

  2. If you have aerial photography experience, you can shoot perfect
    photos from high altitude. It eliminates much of the effort, time, and cost
    normally associated with creating a polished documentary.
    So the moment you see the shot angle approaching, the pilot needs to take the
    necessary steps to remove the obstacles in the view.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>