Warning: This article is targeted at OS X, not Windows.
As I begin building my mobile web application I would like to see how it looks on both Android and iPhone. To do this, I need to install both the Android SDK, and Xcode from Apple.
Installing the Android SDK to browse mobile websites.
- Head on over to http://developer.android.com/sdk/index.html and download the SDK for OS X
- Unzip the .zip file and put it in your home directory
- Change the directory name to android-sdk
- Open up Terminal
cd
nano .bash_profile
- The nano editor will open.
- Paste this into your editor
export PATH=${PATH}:~/android-sdk/tools
- Press control-x and enter to save the file
- Restart your terminal session with…
bash
- Then start the android SDK with…
android
- Once the Android SDK opens, click on Available packages

- As of this post, there are a number of packages available, but I prefer some of the older ones as they load faster and still offer a contemporary browsing experience. I chose API 8, along with the Samples for API 8.
- Click Install Selected
- After the install is finished, click on Virtual Devices and then New
- Name your Virtual Device whatever you wish (I called mine Andy).

- Click Create AVD
- Click Start
- Your Virtual Device will boot up. Click on the Browser icon, and you can surf the internet Mobile style.

Using Dashcode to browse in Mobile Safari
The best way to test the mobile browsing experience for iPhone’s Safari is to use Dashcode, which comes as part of Xcode, available in the Desktop App.
- Open the App Store and install XCode. Warning: If you are on Lion there are issues with XCode as of fall 2011.

- After installing XCode, go to Spotlight and search for Dashcode

- When Dashcode opens, choose a Browser template and uncheck the Safari checkbox – leaving only Mobile Safari checked

- Once the example template loads starts click Run
- The iPhone Simulator will open
- Once the example application loads, click in the address bar and enter whatever URL you wish!

Now that I can test the browsability of the web application on the only two platforms that matter (sorry RIM & Microsoft) – I can continue developing my application and keep Safari Mobile and the Android Browser within reach.


