How to setup Android emulator to test mobile web apps

The real deal with Mobile web application development is testing it on multiple devices. So every one may not be able to buy all the mobile devices to test, especially with Android. Since we have many devices from multiple OEM’s and with different screen size, it’s not a feasible option to buy all devices and test. Thanks to Google for providing emulators to make our job easy!

I have already wrote an article on testing mobile web applications in Android Emulator, but it’s initial version of Android device and it’s depreciated now. So, i thought writing extension to that with latest tools available from Google. 

In this article, i will show you how to setup Android Emulator to test your mobile web applications on Windows OS [Since, more people looking for a solution on this platform Winking smile].

  • Download the Android SDK from this URL – Android SDK.

image

NOTE: There may be change of page layout in future, but i hope Google allow to download the Android SDK.

  • It gives you option to download x86 or x64 version. It’s up to you to choose the right version for you. NO CONSTRAINTS. The SDK contains all the required tools to get started with developing Android apps, anyway it’s out of topic.
  • Once you are done downloading, unzip it. You will see two folders and  SDK Manager.exe.

image

  • Click on the SDK Manager to launch. It launches the Android SDK Manager window.

image

  • Now click on Tools –> Manage AVDs…

image

  • It launches Android Virtual Device Manager window.

image

  • Now, we need to create a new Android Virtual Device, by clicking on New… button.
  • When you click on New… button, it launches Create New Android Virtual Device (AVD) window.

image

  • Enter AVD Name, select Device  and Target. In the Device dropdown, you will get all the devices with different screen sizes including Android Tablets.
  • Target has the recent Android Version list, which you can select the required one. Now, we have Android 4.2 Jelly Bean.

image

  • You can leave the rest of the fields to their defaults, which we are not going to mess up. If you wish to play around with other fields too, you are free to do that. Again NO CONSTRAINTS.
  • On clicking on OK button, it shows message box, which summarizes the configuration of out emulator.

image

  • Click OK button. Now the newly configured Android emulator is added to the list.

image

  • Now select the newly created emulator and click on Start… button.

image

  • It will invoke Launch Options dialog.

image

  • Click on Launch button, by leaving the options to their defaults! It will launch the emulator Smile

image

  • Now we are ready to test our mobile web application.
  • Launch the web browser in the emulator and test your applications!

image

NOTE: If you are testing your mobile web apps, that are deployed to local IIS, then you have to use IP Address instead of using localhost.

Happy mobile web application programming and testing!

Thanks!

Testing ASP.NET Web Apps in Google Android emulator

Finally, I got the solution for testing ASP.NET Web applications in Google Android emulator. Download the Google Android emulator from the below link

Android Emulator Download

Once you download the Android emulator, extract the “Android-Emulator.zip” file. Now double click on Run_Emulator(with Boot Animation).exe or Run_Emulator(without Boot Animation).exe to launch the Android emulator.

image

 

Now you can test your ASP.NET web apps in Android Emulator. To do that, first deploy your ASP.NET Web application to Local IIS(Internet Information Services). Once the web application is deployed, use the IP Address of the system to test the web application in the Android emulator.

image

NOTE: JRE (Java Runtime Environment) 1.6 or above and JDK(Java Development Kit) 1.6 or above should be installed in your system, in order to work with the Google Android emulator.

You are done now. Happy coding ASP.NET Web apps for Mobile phones.

Cheers!!!