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

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

  1. Cost segregation provides a net reduction in income taxes (based on the difference between the ordinary income rate and the capital gains rate).
    In addition to this, you also need cash inflow and outflow statement on a monthly basis.
    This includes keeping your unit(s) full almost all of the time.

    Also visit my web site; property managers 48164 –
    Lonny,

  2. If your home or appliances use gas, make sure it is on and all the pilot lights are working.
    Fogging between the panes indicate that you have a broken seal.
    When you store stuffed decorations, it’s okay to put them in large plastic containers, but be sure to place
    them in a way that they will not get bent or disfigured and use a plastic bag over
    items that are fragile such as a porcelain head on a
    stuffed doll to keep her hair in place and her face clean and safe.

    Visit my site :: concrete crack repair New Baltimore MI, Silas,

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>