Home > Articles > Mobile Application Development & Programming

  • Print
  • + Share This
This chapter is from the book

Workshop

Quiz

  1. Which features are available in the DDMS perspective?

    1. Taking screenshots of emulator and handset screens
    2. Browsing the file system of the emulator or handset
    3. Monitoring thread and heap information on the Android system
    4. Stopping processes
    5. Simulating incoming phone calls and SMS messages to emulators
    6. All of the above
  2. True or False: You must use the Android emulator for debugging.

  3. Which target platforms can Android applications be written for?

  4. True or False: The Android emulator is a generic device that supports only one screen configuration.

Answers

  1. F. All of the above. The DDMS perspective can be used to monitor, browse, and interact with emulators and handsets in a variety of ways.

  2. False. The Android emulator is useful for debugging, but you can also connect the debugger to an actual device and directly debug applications running on real hardware.

  3. There are a number of target platforms available and more are added with each new SDK release. Some important platform targets include Android 1.6, Android 2.1, Android 2.2, Android 2.3, and Android 3.0. Targets can include the Google APIs, if desired. These targets map to the AVD profiles you must create in order to use the Android emulator.

  4. False. The Android emulator is a generic device, but it can support several different skins. For a complete list of skins supported, see the Android SDK and AVD Manager.

Exercises

  1. Launch the Android emulator and customize your home screen. Change the wallpaper. Install an AppWidget. Get familiar with how the emulator tries to mimic a real handset. Note the limitations, such as how the dialer works.

  2. Launch the Android emulator and browse the Settings application. Try changing a setting and see what happens. Uninstall an application (Settings, Applications, Manage Applications, click on an application and press the UnInstall button, then confirm with the OK button to uninstall an application). Under the About phone submenu, check the Android version.

  3. Launch the Android emulator and browse the Dev Tools application. Review the settings available, especially those within the Development Settings submenu. Check out the documentation for this tool on the Android Developer website at http://goo.gl/QcScV.

  4. Launch the Android emulator and add a few test contacts to your Contacts database for this AVD. If you give a contact the phone number you like to use for incoming calls from the DDMS perspective, the contact's name and picture display whenever that phone number is used for testing purposes.

  5. Add a new image file to your emulator instance. Find a JPG graphic file, such as a photo, and use the DDMS perspective's File Explorer to push the file to the /mnt/sdcard/download directory of the emulator. Launch the Gallery application and if the image does not immediately appear, then use the Dev Tools application to perform a media scan and re-launch the Gallery application. After the graphic is visible in the Gallery, go create a contact and set the contact's photo to that photo.

  • + Share This
  • 🔖 Save To Your Account