Computer Science 318
Mobile Apps and the Internet of Things

Assignment 3: Activities and rotation

Due Wednesday 12 October


  1. Be able to support switching activities in an app

  2. Understand how to support and detect rotation

What to do

Read through the end of Chapter 5, being careful to make the suggested modifications to GeoQuiz along the way. (I had trouble getting the landscape layout to work as specified on pages 66-67, so I ended up just copy-pasting my existing activity_quiz.xml into the layout-land folder, which looked nice and is what I suggest you do too.) Then complete the Challenge items on p. 110.

Remember, for this and future apps, I'll want to see a distinct icon for your app (not just the cute little Android guy you get by default). If you didn't do this for Assignment 2, re-read pp. 47-48 on how to add icons to your app, and do it now. Specifically, you'll want to put a different ic_launcher.png (launcher icon) file of appropriate size into each folder.

The easiest way to do this is to get an image from the web to use as your launch icon (okay unless you're planning on publishing your app); or you can get creative and use PowerPoint or your favorite drawing program to create an image yourself. You can then use an online tool like Android Asset Studio to create the launch icons from your image, or do it the old-school way:

  1. Use an image-editing program like GIMP to resize your image to a square. Feel free to ask me for help with GIMP if you need it!

  2. Checking the size of the existing ic_launcher.png image in each image sub-folder, use GIMP to rescale your own image, then export your resized image as ic_launcher.png, overwriting the existing image file. Once you've overwritten the existing image, undo the rescale and move on to the next folder.

What to turn in

In your sakai dropbox, create an assignment3 folder. Then, zip up the root directory of your modified GeoQuiz app and upload it to this folder.