10-152-383 - Mobile Programming 1

1.1 Lab

Build and Run T-Shirt Example App

For this lab, you will use an example app from Xamarin to verify that your development environment is set up properly and to run your first app.

  1. Go to https://xamarin.com/shirt.
  2. Scroll down to the bottom of the page. Use one of the two options to get the source code for the t-shirt app. Either clone the Git repository from GitHub, or download the zip file.
  3. Once you have cloned or downloaded and unzipped the source code, open Xamarin Studio.
  4. Open the solution file (.sln) for the t-shirt app in Xamarin Studio.
  5. Right click on the Android project and set it as the startup project.
  6. Right click on the Android project to build it.
  7. Choose a virtual device to run your app in.
  8. Click the play button to start the Android app for debugging.
  9. Your virtual device should launch in the emulator. Once Android boots up, your app will be deployed and started in the emulator.
  10. Try clicking around in the app as if you were tapping on a phone screen with your finger.
  11. Take a screenshot of your running app. This will be submitted as part of the assignment.
  12. If you get to the checkout step, you'll see that it is asking you to make a code change to add your e-mail address.
  13. Stop debugging in Xamarin Studio, but don't shut down the emulator.
  14. Make the requested code change.
  15. Run the app again.
  16. Go to the checkout screen where it will ask you to login.
  17. Take a screenshot of the login screen. This will be submitted as part of the assignment.
  18. If you would like to order a free C# t-shirt, you can complete the login process. Xamarin will use your account information to send you the free shirt. Make sure to pick the size and color you want.
  19. Zip up and submit the source code and two screenshots in Blackboard.