Test Bank for Introduction to Android Application Development Android Essentials, 5th Edition
Take your exam prep to the next level with Test Bank for Introduction to Android Application Development Android Essentials, 5th Edition—get instant access to essential questions.
Joseph Wilson
Contributor
4.9
117
about 2 months ago
Preview (21 of 69)
Sign in to access the full document!
Introduction to Android™
Application Development
Test Bank
Fifth Edition
Joseph Annuzzi, Jr.
Lauren Darcey
Shane Conder
ISBN-13: 978-0-13-443363-9
ISBN-10: 0-13-443363-7
Application Development
Test Bank
Fifth Edition
Joseph Annuzzi, Jr.
Lauren Darcey
Shane Conder
ISBN-13: 978-0-13-443363-9
ISBN-10: 0-13-443363-7
Contents 2
Contents
Chapter 1: Presenting Android ............................................................................................... 4
Multiple Choice Questions ........................................................................................................................ 4
Answers and Explanations ........................................................................................................................ 6
Chapter 2: Setting Up for Development.................................................................................. 7
Multiple Choice Questions ........................................................................................................................ 7
Answers and Explanations ........................................................................................................................ 9
Chapter 3: Creating Your First Application ...........................................................................10
Multiple Choice Questions ...................................................................................................................... 10
Answers and Explanations ...................................................................................................................... 12
Chapter 4: Understanding Application Components............................................................13
Multiple Choice Questions ...................................................................................................................... 13
Answers and Explanations ...................................................................................................................... 15
Chapter 5: Defining the Manifest ...........................................................................................16
Multiple Choice Questions ...................................................................................................................... 16
Answers and Explanations ...................................................................................................................... 18
Chapter 6: Managing Application Resources........................................................................19
Multiple Choice Questions ...................................................................................................................... 19
Answers and Explanations ...................................................................................................................... 21
Chapter 7: Exploring Building Blocks ...................................................................................22
Multiple Choice Questions ...................................................................................................................... 22
Answers and Explanations ...................................................................................................................... 24
Chapter 8: Positioning with Layouts .....................................................................................25
Multiple Choice Questions ...................................................................................................................... 25
Answers and Explanations ...................................................................................................................... 27
Chapter 9: Partitioning with Fragments ................................................................................28
Multiple Choice Questions ...................................................................................................................... 28
Answers and Explanations ...................................................................................................................... 30
Chapter 10: Architecting with Patterns..................................................................................31
Multiple Choice Questions ...................................................................................................................... 31
Answers and Explanations ...................................................................................................................... 33
Chapter 11: Appealing with Style ...........................................................................................34
Multiple Choice Questions ...................................................................................................................... 34
Answers and Explanations ...................................................................................................................... 36
Chapter 12: Embracing Material Design ................................................................................37
Multiple Choice Questions ...................................................................................................................... 37
Answers and Explanations ...................................................................................................................... 39
Chapter 13: Designing Compatible Applications ..................................................................40
Multiple Choice Questions ...................................................................................................................... 40
Answers and Explanations ...................................................................................................................... 42
Chapter 14: Using Android Preferences ................................................................................43
Multiple Choice Questions ...................................................................................................................... 43
Answers and Explanations ...................................................................................................................... 45
Chapter 15: Accessing Files and Directories ........................................................................46
Multiple Choice Questions ...................................................................................................................... 46
Contents
Chapter 1: Presenting Android ............................................................................................... 4
Multiple Choice Questions ........................................................................................................................ 4
Answers and Explanations ........................................................................................................................ 6
Chapter 2: Setting Up for Development.................................................................................. 7
Multiple Choice Questions ........................................................................................................................ 7
Answers and Explanations ........................................................................................................................ 9
Chapter 3: Creating Your First Application ...........................................................................10
Multiple Choice Questions ...................................................................................................................... 10
Answers and Explanations ...................................................................................................................... 12
Chapter 4: Understanding Application Components............................................................13
Multiple Choice Questions ...................................................................................................................... 13
Answers and Explanations ...................................................................................................................... 15
Chapter 5: Defining the Manifest ...........................................................................................16
Multiple Choice Questions ...................................................................................................................... 16
Answers and Explanations ...................................................................................................................... 18
Chapter 6: Managing Application Resources........................................................................19
Multiple Choice Questions ...................................................................................................................... 19
Answers and Explanations ...................................................................................................................... 21
Chapter 7: Exploring Building Blocks ...................................................................................22
Multiple Choice Questions ...................................................................................................................... 22
Answers and Explanations ...................................................................................................................... 24
Chapter 8: Positioning with Layouts .....................................................................................25
Multiple Choice Questions ...................................................................................................................... 25
Answers and Explanations ...................................................................................................................... 27
Chapter 9: Partitioning with Fragments ................................................................................28
Multiple Choice Questions ...................................................................................................................... 28
Answers and Explanations ...................................................................................................................... 30
Chapter 10: Architecting with Patterns..................................................................................31
Multiple Choice Questions ...................................................................................................................... 31
Answers and Explanations ...................................................................................................................... 33
Chapter 11: Appealing with Style ...........................................................................................34
Multiple Choice Questions ...................................................................................................................... 34
Answers and Explanations ...................................................................................................................... 36
Chapter 12: Embracing Material Design ................................................................................37
Multiple Choice Questions ...................................................................................................................... 37
Answers and Explanations ...................................................................................................................... 39
Chapter 13: Designing Compatible Applications ..................................................................40
Multiple Choice Questions ...................................................................................................................... 40
Answers and Explanations ...................................................................................................................... 42
Chapter 14: Using Android Preferences ................................................................................43
Multiple Choice Questions ...................................................................................................................... 43
Answers and Explanations ...................................................................................................................... 45
Chapter 15: Accessing Files and Directories ........................................................................46
Multiple Choice Questions ...................................................................................................................... 46
Contents 3
Answers and Explanations ...................................................................................................................... 48
Chapter 16: Saving with SQLite .............................................................................................49
Multiple Choice Questions ...................................................................................................................... 49
Answers and Explanations ...................................................................................................................... 51
Chapter 17: Leveraging Content Providers ...........................................................................52
Multiple Choice Questions ...................................................................................................................... 52
Answers and Explanations ...................................................................................................................... 54
Chapter 18: Learning the Development Workflow ................................................................55
Multiple Choice Questions ...................................................................................................................... 55
Answers and Explanations ...................................................................................................................... 57
Chapter 19: Planning the Experience ....................................................................................58
Multiple Choice Questions ...................................................................................................................... 58
Answers and Explanations ...................................................................................................................... 60
Chapter 20: Delivering Quality Applications .........................................................................61
Multiple Choice Questions ...................................................................................................................... 61
Answers and Explanations ...................................................................................................................... 63
Chapter 21: Testing Your Applications ..................................................................................64
Multiple Choice Questions ...................................................................................................................... 64
Answers and Explanations ...................................................................................................................... 66
Chapter 22: Distributing Your Applications...........................................................................67
Multiple Choice Questions ...................................................................................................................... 67
Answers and Explanations ...................................................................................................................... 69
Answers and Explanations ...................................................................................................................... 48
Chapter 16: Saving with SQLite .............................................................................................49
Multiple Choice Questions ...................................................................................................................... 49
Answers and Explanations ...................................................................................................................... 51
Chapter 17: Leveraging Content Providers ...........................................................................52
Multiple Choice Questions ...................................................................................................................... 52
Answers and Explanations ...................................................................................................................... 54
Chapter 18: Learning the Development Workflow ................................................................55
Multiple Choice Questions ...................................................................................................................... 55
Answers and Explanations ...................................................................................................................... 57
Chapter 19: Planning the Experience ....................................................................................58
Multiple Choice Questions ...................................................................................................................... 58
Answers and Explanations ...................................................................................................................... 60
Chapter 20: Delivering Quality Applications .........................................................................61
Multiple Choice Questions ...................................................................................................................... 61
Answers and Explanations ...................................................................................................................... 63
Chapter 21: Testing Your Applications ..................................................................................64
Multiple Choice Questions ...................................................................................................................... 64
Answers and Explanations ...................................................................................................................... 66
Chapter 22: Distributing Your Applications...........................................................................67
Multiple Choice Questions ...................................................................................................................... 67
Answers and Explanations ...................................................................................................................... 69
Loading page 4...
Chapter 1: Presenting Android Multiple Choice Questions 4
Chapter 1: Presenting Android
Multiple Choice Questions
1. In which of the following programming languages are Android applications written?
a. PHP
b. C++
c. Java
d. HTML
2. Joe receives a pop-up alert on his Android device stating that a friend has challenged him to
a game. Which part of the Android application framework does this involve?
a. Notifications
b. Content
c. Intents
d. Services
3. Which Android platform service manages the basic user interface on the device?
a. FragmentManager
b. AccessibilityManager
c. ClipboardManager
d. ViewManager
4. Which of the following benefits is provided by joining the Open Handset Alliance for device
manufacturers?
a. The ability to license Google Mobile Services (GMS)
b. Access to the Android Open Source Project
c. The ability to publish applications on Google Play
d. No developer registration fee for publishing applications on Google Play
5. To what platform do Android developers currently publish apps?
a. Google Play app store
b. App Store
c. Cydia
d. The Android Market
6. Which of the following statistics released by Google at its annual Google I/O conference is
factual as of May 2015?
a. Android devices ship to over 180 countries.
b. Google Play had more than 2 billion active users.
c. There were 50 billion app installs in the previous 12 months.
d. Angry birds held the number-1 app install for the previous 12 months.
7. What does WAP stand for?
a. Wide Area Proxy
b. Web Alternative Protocol
c. Wireless Access Point
d. Wireless Application Protocol
Chapter 1: Presenting Android
Multiple Choice Questions
1. In which of the following programming languages are Android applications written?
a. PHP
b. C++
c. Java
d. HTML
2. Joe receives a pop-up alert on his Android device stating that a friend has challenged him to
a game. Which part of the Android application framework does this involve?
a. Notifications
b. Content
c. Intents
d. Services
3. Which Android platform service manages the basic user interface on the device?
a. FragmentManager
b. AccessibilityManager
c. ClipboardManager
d. ViewManager
4. Which of the following benefits is provided by joining the Open Handset Alliance for device
manufacturers?
a. The ability to license Google Mobile Services (GMS)
b. Access to the Android Open Source Project
c. The ability to publish applications on Google Play
d. No developer registration fee for publishing applications on Google Play
5. To what platform do Android developers currently publish apps?
a. Google Play app store
b. App Store
c. Cydia
d. The Android Market
6. Which of the following statistics released by Google at its annual Google I/O conference is
factual as of May 2015?
a. Android devices ship to over 180 countries.
b. Google Play had more than 2 billion active users.
c. There were 50 billion app installs in the previous 12 months.
d. Angry birds held the number-1 app install for the previous 12 months.
7. What does WAP stand for?
a. Wide Area Proxy
b. Web Alternative Protocol
c. Wireless Access Point
d. Wireless Application Protocol
Loading page 5...
Chapter 1: Presenting Android Multiple Choice Questions 5
8. Which of the following companies have manufactured Android devices?
a. Samsung
b. HTC
c. Apple
d. Motorola
9. What brand of Android devices did Google create?
a. Nexus
b. Galaxy X
c. T-Mobile G1
d. Motorola Droid
10. What does API stand for?
a. Automatic programming input
b. Application programming interface
c. Android program interpreter
d. Algorithm parse iteration
8. Which of the following companies have manufactured Android devices?
a. Samsung
b. HTC
c. Apple
d. Motorola
9. What brand of Android devices did Google create?
a. Nexus
b. Galaxy X
c. T-Mobile G1
d. Motorola Droid
10. What does API stand for?
a. Automatic programming input
b. Application programming interface
c. Android program interpreter
d. Algorithm parse iteration
Loading page 6...
Chapter 1: Presenting Android Answers and Explanations 6
Answers and Explanations
1. c. Android is written in the well-respected Java programming language.
2. a. Alerts are part of the notifications to users. Notifications alert users when the app
developer would like to let them know that something important happened in the app.
3. d. The ViewManager handles the user interface and display on the device. The
FragmentManager manages the fragments of an activity. The AccessibilityManager
manages accessibility events, facilitating device support for users with physical impairments.
The ClipboardManager provides the device with access to the global clipboard for cutting
and pasting content.
4. a. The ability to license Google Mobile Services (GMS)
5. a. Developers publish apps to the Google Play app store. The App Store is where iOS
developers publish. Cydia is a repository for jailbroken iOS apps. The Android Market was a
former name for the Google Play store.
6. c. There were 50 billion app installs in the previous 12 months.
7. d. WAP is an acronym for Wireless Application Protocol.
8. a, b, d. Apple has never manufactured an Android device, but Samsung, HTC, and Motorola
have.
9. a. The Nexus devices were created by Google to provide the full, authentic Android
experience as Google intends. Many developers use these devices for building and testing
their applications because they are the only devices in the world that receive the latest
Android operating system upgrades as they are released.
10. b. API is an acronym for application programming interface.
Answers and Explanations
1. c. Android is written in the well-respected Java programming language.
2. a. Alerts are part of the notifications to users. Notifications alert users when the app
developer would like to let them know that something important happened in the app.
3. d. The ViewManager handles the user interface and display on the device. The
FragmentManager manages the fragments of an activity. The AccessibilityManager
manages accessibility events, facilitating device support for users with physical impairments.
The ClipboardManager provides the device with access to the global clipboard for cutting
and pasting content.
4. a. The ability to license Google Mobile Services (GMS)
5. a. Developers publish apps to the Google Play app store. The App Store is where iOS
developers publish. Cydia is a repository for jailbroken iOS apps. The Android Market was a
former name for the Google Play store.
6. c. There were 50 billion app installs in the previous 12 months.
7. d. WAP is an acronym for Wireless Application Protocol.
8. a, b, d. Apple has never manufactured an Android device, but Samsung, HTC, and Motorola
have.
9. a. The Nexus devices were created by Google to provide the full, authentic Android
experience as Google intends. Many developers use these devices for building and testing
their applications because they are the only devices in the world that receive the latest
Android operating system upgrades as they are released.
10. b. API is an acronym for application programming interface.
Loading page 7...
Chapter 2: Setting Up for Development Multiple Choice Questions 7
Chapter 2: Setting Up for Development
Multiple Choice Questions
1. What must developers enable on Android devices in order to install their applications?
a. ADTs
b. Emulators
c. Developer options
d. Certificates
2. Which one of the following provides a complete list of specific changes to the Android SDK?
a. API Diff Report
b. Release Notes
c. Overview of Changes
d. Errata Notification
3. Who retains all rights to Android apps developed with the SDK?
a. Google
b. Microsoft
c. Android, Inc.
d. The developer
4. Which one of the following packages provides encryption support?
a. org.json
b. javax.*
c. android.*
d. junit.*
5. What is the official Android development environment?
a. Android IDE
b. Xcode
c. Visual Basic
d. Android Studio
6. Megan wants to download and update the development tools while still maintaining
backward compatibility. What tool within the IDE will she use?
a. Android Compatibility Manager
b. Android SDK Manager
c. Android Time Manager
d. Android Virtual Device Manager
7. Within the IDE, what does a developer use to load Android applications, and test and debug
them?
a. AVD configuration
b. The Android emulator
c. A simulator
d. Test devices
Chapter 2: Setting Up for Development
Multiple Choice Questions
1. What must developers enable on Android devices in order to install their applications?
a. ADTs
b. Emulators
c. Developer options
d. Certificates
2. Which one of the following provides a complete list of specific changes to the Android SDK?
a. API Diff Report
b. Release Notes
c. Overview of Changes
d. Errata Notification
3. Who retains all rights to Android apps developed with the SDK?
a. Google
b. Microsoft
c. Android, Inc.
d. The developer
4. Which one of the following packages provides encryption support?
a. org.json
b. javax.*
c. android.*
d. junit.*
5. What is the official Android development environment?
a. Android IDE
b. Xcode
c. Visual Basic
d. Android Studio
6. Megan wants to download and update the development tools while still maintaining
backward compatibility. What tool within the IDE will she use?
a. Android Compatibility Manager
b. Android SDK Manager
c. Android Time Manager
d. Android Virtual Device Manager
7. Within the IDE, what does a developer use to load Android applications, and test and debug
them?
a. AVD configuration
b. The Android emulator
c. A simulator
d. Test devices
Loading page 8...
Chapter 2: Setting Up for Development Multiple Choice Questions 8
8. Which setting must you enable on an Android device to install Android applications other
than those from the Google Play store?
a. Unknown APKs
b. Unknown sources
c. Unknown applications
d. Alternative app stores
9. Android Studio is based on what other IDE?
a. Eclipse
b. Sublime
c. IntelliJ IDEA
d. XDA Developer
10. Who owns the copyrights and intellectual property rights to the material in the SDK?
a. The developer.
b. Google and third parties.
c. Android development leads.
d. The SDK is open source and not under copyright.
8. Which setting must you enable on an Android device to install Android applications other
than those from the Google Play store?
a. Unknown APKs
b. Unknown sources
c. Unknown applications
d. Alternative app stores
9. Android Studio is based on what other IDE?
a. Eclipse
b. Sublime
c. IntelliJ IDEA
d. XDA Developer
10. Who owns the copyrights and intellectual property rights to the material in the SDK?
a. The developer.
b. Google and third parties.
c. Android development leads.
d. The SDK is open source and not under copyright.
Loading page 9...
Chapter 2: Setting Up for Development Answers and Explanations 9
Answers and Explanations
1. c. If developers do not enable Developer options, they will not be able to install their
applications on Android devices.
2. a. An API Diff Report provides a complete list of specific changes to the SDK. The Overview
of Changes is a brief description of the major changes to the SDK. The Release Notes are a
list of known issues with the SDK.
3. d. The developer retains all rights to any Android software developed with the SDK,
including intellectual property rights. Developers also retain all responsibility for their own
work.
4. b. The javax.* package provides encryption support. org.json provides JavaScript
Object Notation support. The Android fundamentals are included in the android.*
package. junit.* supplies functionality for unit-testing.
5. d. Android Studio
6. b. The Android SDK Manager facilitates Android development across multiple platform
versions simultaneously. When a new Android SDK is released, you can use this tool to
download and update your tools while still maintaining backward compatibility with older
versions of the Android SDK.
7. b. The Android emulator is one of the most important tools provided with the Android SDK.
You will use this tool frequently when designing and developing Android applications. The
emulator runs on your computer and behaves much as a mobile device would. You can load
Android applications into the emulator, and then test and debug them.
8. b. Unknown sources
9. c. IntelliJ IDEA
10. b. Google (as the copyright holder of Android) grants you a limited, worldwide, royalty-free,
nonassignable, and nonexclusive license to use the SDK solely to develop applications for
the Android platform. Google (and third-party contributors) are granting you license, but they
still hold all copyrights and intellectual property rights to the material. Using the Android SDK
does not grant you permission to use any Google brands, logos, or trade names. You may
not remove any of the copyright notices therein. Third-party applications that your
applications interact with (other Android apps) are subject to separate terms and fall outside
this agreement.
Answers and Explanations
1. c. If developers do not enable Developer options, they will not be able to install their
applications on Android devices.
2. a. An API Diff Report provides a complete list of specific changes to the SDK. The Overview
of Changes is a brief description of the major changes to the SDK. The Release Notes are a
list of known issues with the SDK.
3. d. The developer retains all rights to any Android software developed with the SDK,
including intellectual property rights. Developers also retain all responsibility for their own
work.
4. b. The javax.* package provides encryption support. org.json provides JavaScript
Object Notation support. The Android fundamentals are included in the android.*
package. junit.* supplies functionality for unit-testing.
5. d. Android Studio
6. b. The Android SDK Manager facilitates Android development across multiple platform
versions simultaneously. When a new Android SDK is released, you can use this tool to
download and update your tools while still maintaining backward compatibility with older
versions of the Android SDK.
7. b. The Android emulator is one of the most important tools provided with the Android SDK.
You will use this tool frequently when designing and developing Android applications. The
emulator runs on your computer and behaves much as a mobile device would. You can load
Android applications into the emulator, and then test and debug them.
8. b. Unknown sources
9. c. IntelliJ IDEA
10. b. Google (as the copyright holder of Android) grants you a limited, worldwide, royalty-free,
nonassignable, and nonexclusive license to use the SDK solely to develop applications for
the Android platform. Google (and third-party contributors) are granting you license, but they
still hold all copyrights and intellectual property rights to the material. Using the Android SDK
does not grant you permission to use any Google brands, logos, or trade names. You may
not remove any of the copyright notices therein. Third-party applications that your
applications interact with (other Android apps) are subject to separate terms and fall outside
this agreement.
Loading page 10...
Chapter 3: Creating Your First Application Multiple Choice Questions 10
Chapter 3: Creating Your First Application
Multiple Choice Questions
1. Which one of the following terms best describes what allows the developer to pick a device
for creating an emulator and determines which platform(s) the app will support?
a. API level
b. Google APIs
c. Build tools
d. AVD profile
2. On the Welcome to Android Studio screen, to work with the BorderlessButtons sample
application, which of the following Quick Start options should you select?
a. Start a new Android Studio project
b. Open an existing Android Studio project
c. Import an Android code sample
d. Check out your project from Version Control
3. What is the central configuration file for Android applications?
a. libs/android-support-v4.jar
b. AndroidManifest.xml
c. proguard-project.txt
d. res/layout
4. In Android Studio, which tab should you use to view breakpoints, step through code, and
watch the Logcat logging information about your application?
a. Variable Browser
b. Step Into
c. Debugger
d. Android Runtime
5. Which package contains the Log class?
a. android.util
b. java.*
c. android.support
d. android.appwidget
6. Which Android Studio option allows a developer to save time by automatically removing any
unused imported classes?
a. Fix imports
b. Quick includes
c. Run optimizations
d. Optimize imports
7. What folder is required for all autogenerated files?
a. build/
b. libs/
c. src/
d. main/
Chapter 3: Creating Your First Application
Multiple Choice Questions
1. Which one of the following terms best describes what allows the developer to pick a device
for creating an emulator and determines which platform(s) the app will support?
a. API level
b. Google APIs
c. Build tools
d. AVD profile
2. On the Welcome to Android Studio screen, to work with the BorderlessButtons sample
application, which of the following Quick Start options should you select?
a. Start a new Android Studio project
b. Open an existing Android Studio project
c. Import an Android code sample
d. Check out your project from Version Control
3. What is the central configuration file for Android applications?
a. libs/android-support-v4.jar
b. AndroidManifest.xml
c. proguard-project.txt
d. res/layout
4. In Android Studio, which tab should you use to view breakpoints, step through code, and
watch the Logcat logging information about your application?
a. Variable Browser
b. Step Into
c. Debugger
d. Android Runtime
5. Which package contains the Log class?
a. android.util
b. java.*
c. android.support
d. android.appwidget
6. Which Android Studio option allows a developer to save time by automatically removing any
unused imported classes?
a. Fix imports
b. Quick includes
c. Run optimizations
d. Optimize imports
7. What folder is required for all autogenerated files?
a. build/
b. libs/
c. src/
d. main/
Loading page 11...
Chapter 3: Creating Your First Application Multiple Choice Questions 11
8. Gavin is logging debug messages in his application. What logging method should he use?
a. Logging.d()
b. Logging.debug()
c. Log.d()
d. Log.debug()
9. When Jason rotates the screen on his Android device, what method is called?
a. start()
b. onCreate()
c. run()
d. setOrientation()
10. Where is the All Apps button found?
a. In the Favorites tray
b. In the Home tray
c. In the Navigation tray
d. In the Recents tray
8. Gavin is logging debug messages in his application. What logging method should he use?
a. Logging.d()
b. Logging.debug()
c. Log.d()
d. Log.debug()
9. When Jason rotates the screen on his Android device, what method is called?
a. start()
b. onCreate()
c. run()
d. setOrientation()
10. Where is the All Apps button found?
a. In the Favorites tray
b. In the Home tray
c. In the Navigation tray
d. In the Recents tray
Loading page 12...
Chapter 3: Creating Your First Application Answers and Explanations 12
Answers and Explanations
1. d. The AVD profile describes what type of device you want the emulator to simulate,
including which Android platform to support. You can specify different screen sizes and
orientations, and you can specify whether the emulator has an SD card and, if it does, what
capacity the card has.
2. c. Import an Android code sample
3. b. AndroidManifest.xml is the central configuration file for the application. It defines
your application’s capabilities and permissions, as well as how it runs.
4. c. The Debugger tab
5. a. Android logging features are in the Log class of the android.util package.
6. d. Optimize imports
7. a. build/
8. c. Log.d()
9. b. The onCreate() method is called every time the user navigates to the Activity
(forward or backward), and whenever he or she rotates the screen or initiates other device
configuration changes.
10. a. The Favorites tray
Answers and Explanations
1. d. The AVD profile describes what type of device you want the emulator to simulate,
including which Android platform to support. You can specify different screen sizes and
orientations, and you can specify whether the emulator has an SD card and, if it does, what
capacity the card has.
2. c. Import an Android code sample
3. b. AndroidManifest.xml is the central configuration file for the application. It defines
your application’s capabilities and permissions, as well as how it runs.
4. c. The Debugger tab
5. a. Android logging features are in the Log class of the android.util package.
6. d. Optimize imports
7. a. build/
8. c. Log.d()
9. b. The onCreate() method is called every time the user navigates to the Activity
(forward or backward), and whenever he or she rotates the screen or initiates other device
configuration changes.
10. a. The Favorites tray
Loading page 13...
Chapter 4: Understanding Application Components Multiple Choice Questions 13
Chapter 4: Understanding Application Components
Multiple Choice Questions
1. The central command center for an Android application is known as the
a. Context
b. Service
c. Intent
d. Activity
2. The tasks in an Android application are referred to as
a. Intents
b. Actions
c. Activities
d. Services
3. For what purpose is a fragment commonly used?
a. To allow application components such as activities and services to communicate with
one another
b. To measure the amount of battery usage
c. To avoid app crashes due to memory leaks
d. To hold the code and screen logic for placing the same user interface component in
multiple screens
4. A resource identifier is a unique number that is generated where?
a. In the settings of the Eclipse IDE
b. Within the R.java class
c. Within the resources.* package
d. Within the id.java class
5. The onCreate() method has a single parameter named
a. Buffer
b. Device
c. Bundle
d. Partition
6. When the Activity reaches the top of the Activity stack and becomes the foreground
process, what method is called?
a. onDestroy()
b. onRestart()
c. onPause()
d. onResume()
7. If an Activity is vulnerable to being killed by the Android operating system due to low
memory, the Activity can save state information to a Bundle object by using which
callback method?
a. onStop()
b. isFinishing()
c. onSaveInstanceState()
d. killProcesses()
Chapter 4: Understanding Application Components
Multiple Choice Questions
1. The central command center for an Android application is known as the
a. Context
b. Service
c. Intent
d. Activity
2. The tasks in an Android application are referred to as
a. Intents
b. Actions
c. Activities
d. Services
3. For what purpose is a fragment commonly used?
a. To allow application components such as activities and services to communicate with
one another
b. To measure the amount of battery usage
c. To avoid app crashes due to memory leaks
d. To hold the code and screen logic for placing the same user interface component in
multiple screens
4. A resource identifier is a unique number that is generated where?
a. In the settings of the Eclipse IDE
b. Within the R.java class
c. Within the resources.* package
d. Within the id.java class
5. The onCreate() method has a single parameter named
a. Buffer
b. Device
c. Bundle
d. Partition
6. When the Activity reaches the top of the Activity stack and becomes the foreground
process, what method is called?
a. onDestroy()
b. onRestart()
c. onPause()
d. onResume()
7. If an Activity is vulnerable to being killed by the Android operating system due to low
memory, the Activity can save state information to a Bundle object by using which
callback method?
a. onStop()
b. isFinishing()
c. onSaveInstanceState()
d. killProcesses()
Loading page 14...
Chapter 4: Understanding Application Components Multiple Choice Questions 14
8. When an Activity moves to the top of the Activity stack, the current Activity is
informed that it is being pushed down the Activity stack by what method?
a. onPause()
b. onStop()
c. onResume()
d. onReload()
9. Tasks that do not require user interaction can be encapsulated in a(n)
a. Service
b. Activity
c. Intent
d. Class
10. You can retrieve application resources using which method of the application Context?
a. detectProperties()
b. getResources()
c. getAssets()
d. getAppResources()
8. When an Activity moves to the top of the Activity stack, the current Activity is
informed that it is being pushed down the Activity stack by what method?
a. onPause()
b. onStop()
c. onResume()
d. onReload()
9. Tasks that do not require user interaction can be encapsulated in a(n)
a. Service
b. Activity
c. Intent
d. Class
10. You can retrieve application resources using which method of the application Context?
a. detectProperties()
b. getResources()
c. getAssets()
d. getAppResources()
Loading page 15...
Chapter 4: Understanding Application Components Answers and Explanations 15
Answers and Explanations
1. a. The context is the central command center for an Android application. Most application-
specific functionality can be accessed or referenced through the context.
2. c. An Android application is a collection of tasks, each of which is called an activity. Each
activity within an application has a unique task or purpose.
3. d. A fragment is commonly used to hold the code and screen logic for placing the same user
interface component in multiple screens, which are represented by multiple Activity
classes.
4. b. A resource identifier is a unique number automatically generated within the R.java class.
5. c. The onCreate() method has a single parameter named Bundle.
6. d. When the Activity reaches the top of the Activity stack and becomes the
foreground process, the onResume() method is called.
7. c. If an Activity is vulnerable to being killed by the Android operating system due to low
memory, the Activity can save state information to a Bundle object by using the
onSaveInstanceState() callback method.
8. a. When an Activity moves to the top of the Activity stack, the current Activity is
informed that it is being pushed down the Activity stack by way of the onPause()
method.
9. a. Tasks that do not require user interaction can be encapsulated in a service.
10. c. You can retrieve application resources using the getAssets() method of the application
Context. This returns an AssetManager (android.content.res.AssetManager)
instance that can then be used to open a specific asset by its name.
Answers and Explanations
1. a. The context is the central command center for an Android application. Most application-
specific functionality can be accessed or referenced through the context.
2. c. An Android application is a collection of tasks, each of which is called an activity. Each
activity within an application has a unique task or purpose.
3. d. A fragment is commonly used to hold the code and screen logic for placing the same user
interface component in multiple screens, which are represented by multiple Activity
classes.
4. b. A resource identifier is a unique number automatically generated within the R.java class.
5. c. The onCreate() method has a single parameter named Bundle.
6. d. When the Activity reaches the top of the Activity stack and becomes the
foreground process, the onResume() method is called.
7. c. If an Activity is vulnerable to being killed by the Android operating system due to low
memory, the Activity can save state information to a Bundle object by using the
onSaveInstanceState() callback method.
8. a. When an Activity moves to the top of the Activity stack, the current Activity is
informed that it is being pushed down the Activity stack by way of the onPause()
method.
9. a. Tasks that do not require user interaction can be encapsulated in a service.
10. c. You can retrieve application resources using the getAssets() method of the application
Context. This returns an AssetManager (android.content.res.AssetManager)
instance that can then be used to open a specific asset by its name.
Loading page 16...
Chapter 5: Defining the Manifest Multiple Choice Questions 16
Chapter 5: Defining the Manifest
Multiple Choice Questions
1. What file type is the Android manifest file?
a. HTML
b. XML
c. TXT
d. CSV
2. What symbol is used to specify that a class belongs to the package name specified in the
manifest?
a. #
b. _
c. .
d. $
3. When using the <uses-feature> tag, which optional attribute can be set to true or
false for configuring Google Play store filtering?
a. android:enforced
b. android:play
c. android:permissions
d. android:required
4. Which application attribute is used for an auto backup feature that was introduced in Android
Marshmallow?
a. android:autoBackup
b. android:backupAutomatic
c. android:backupContent
d. android:fullBackupContent
5. If your Android application works with OpenGL ES versions 1.0, 2.0, and 3.0, which version
should you specify in the Google Play store?
a. 1.0
b. 2.0
c. 3.0
d. All versions
6. Which tag is not checked by the Android operating system?
a. The <uses-feature> tag
b. The <supports-gl-texture> tag
c. The <uses-configuration> tag
d. The <compatible-screens> tag
7. Which one of the following permissions do Android applications have by default?
a. Receive data from the Internet
b. View network state
c. Modify or delete the contents of your USB storage
d. None
Chapter 5: Defining the Manifest
Multiple Choice Questions
1. What file type is the Android manifest file?
a. HTML
b. XML
c. TXT
d. CSV
2. What symbol is used to specify that a class belongs to the package name specified in the
manifest?
a. #
b. _
c. .
d. $
3. When using the <uses-feature> tag, which optional attribute can be set to true or
false for configuring Google Play store filtering?
a. android:enforced
b. android:play
c. android:permissions
d. android:required
4. Which application attribute is used for an auto backup feature that was introduced in Android
Marshmallow?
a. android:autoBackup
b. android:backupAutomatic
c. android:backupContent
d. android:fullBackupContent
5. If your Android application works with OpenGL ES versions 1.0, 2.0, and 3.0, which version
should you specify in the Google Play store?
a. 1.0
b. 2.0
c. 3.0
d. All versions
6. Which tag is not checked by the Android operating system?
a. The <uses-feature> tag
b. The <supports-gl-texture> tag
c. The <uses-configuration> tag
d. The <compatible-screens> tag
7. Which one of the following permissions do Android applications have by default?
a. Receive data from the Internet
b. View network state
c. Modify or delete the contents of your USB storage
d. None
Loading page 17...
Chapter 5: Defining the Manifest Multiple Choice Questions 17
8. Which one of the following is not an attribute of the <supports-screens> tag?
a. android:resizable
b. android:anyDensity
c. android:compatibleWidthLimitDp
d. android:wideScreen
9. Which one of the following is not a point where permissions can be enforced?
a. When starting an Activity or Service
b. When accessing data provided by a ContentProvider
c. During the uninstallation of an application
d. When sending or receiving broadcasts by an Intent
10. What requires at least one <action> tag?
a. Specifying required device features
b. Permissions
c. Specifying which hardware and software input methods the application supports
d. Intent filters
8. Which one of the following is not an attribute of the <supports-screens> tag?
a. android:resizable
b. android:anyDensity
c. android:compatibleWidthLimitDp
d. android:wideScreen
9. Which one of the following is not a point where permissions can be enforced?
a. When starting an Activity or Service
b. When accessing data provided by a ContentProvider
c. During the uninstallation of an application
d. When sending or receiving broadcasts by an Intent
10. What requires at least one <action> tag?
a. Specifying required device features
b. Permissions
c. Specifying which hardware and software input methods the application supports
d. Intent filters
Loading page 18...
Chapter 5: Defining the Manifest Answers and Explanations 18
Answers and Explanations
1. b. The Android manifest file is a specially formatted XML file that must accompany each
Android application. This file contains important information about the application’s identity.
2. c. The dot (.) is used as shorthand to specify that a class belongs to the package name
specified in the manifest.
3. d. The android:required attribute can be set to true or false for configuring Google
Play store filtering.
4. d. The android:fullBackupContent was introduced as an auto backup feature in
Android Marshmallow and is set in the <application> tag.
5. a. You should specify the lowest version (1.0) so that the Google Play store allows more
users to install your application.
6. d. The <compatible-screens> tag is used solely by the Google Play store to restrict
installation of your application to devices with specific screen sizes. This tag is not checked
by the Android operating system, and usage is discouraged unless you absolutely need to
restrict the installation of your application on certain devices.
7. d. Android applications have no permissions by default. Instead, any permissions for shared
resources or privileged access must be explicitly registered within the Android manifest file.
8. d. android:widescreen is not a <supports-screens> tag.
9. c. You are not able to enforce permissions during the uninstallation of an application.
10. d. Intent filters must contain at least one <action> tag but can also contain other
information, such as <category> and <data> blocks.
Answers and Explanations
1. b. The Android manifest file is a specially formatted XML file that must accompany each
Android application. This file contains important information about the application’s identity.
2. c. The dot (.) is used as shorthand to specify that a class belongs to the package name
specified in the manifest.
3. d. The android:required attribute can be set to true or false for configuring Google
Play store filtering.
4. d. The android:fullBackupContent was introduced as an auto backup feature in
Android Marshmallow and is set in the <application> tag.
5. a. You should specify the lowest version (1.0) so that the Google Play store allows more
users to install your application.
6. d. The <compatible-screens> tag is used solely by the Google Play store to restrict
installation of your application to devices with specific screen sizes. This tag is not checked
by the Android operating system, and usage is discouraged unless you absolutely need to
restrict the installation of your application on certain devices.
7. d. Android applications have no permissions by default. Instead, any permissions for shared
resources or privileged access must be explicitly registered within the Android manifest file.
8. d. android:widescreen is not a <supports-screens> tag.
9. c. You are not able to enforce permissions during the uninstallation of an application.
10. d. Intent filters must contain at least one <action> tag but can also contain other
information, such as <category> and <data> blocks.
Loading page 19...
Chapter 6: Managing Application Resources Multiple Choice Questions 19
Chapter 6: Managing Application Resources
Multiple Choice Questions
1. What is the application name stored as by default?
a. A Boolean resource
b. A string resource
c. An integer resource
d. A dimension resource
2. Which of the following is not a drawable resource?
a. SizeDrawable
b. TransitionDrawable
c. LayerDrawable
d. ShapeDrawable
3. What resource represents a name/value pair?
a. An integer resource
b. A menu resource
c. A Boolean resource
d. A layout resource
4. What contains generic system resources for things such as standard system colors, system
styles and themes, and standard button text?
a. The Android package
b. The default package
c. The standard package
d. The resource package
5. What are the two different types of view animations?
a. Property animation and tween animation
b. Property animation and frame-by-frame animation
c. Tween animation and fast animation
d. Frame-by-frame animation and tween animation
6. Which category of animations allows you to animate an object’s properties?
a. Tween animation
b. Property animation
c. View animations
d. Frame-by-frame animation
7. Which of the following is not a feature of tween animation?
a. Translation
b. Scaling
c. Repetition
d. Rotation
Chapter 6: Managing Application Resources
Multiple Choice Questions
1. What is the application name stored as by default?
a. A Boolean resource
b. A string resource
c. An integer resource
d. A dimension resource
2. Which of the following is not a drawable resource?
a. SizeDrawable
b. TransitionDrawable
c. LayerDrawable
d. ShapeDrawable
3. What resource represents a name/value pair?
a. An integer resource
b. A menu resource
c. A Boolean resource
d. A layout resource
4. What contains generic system resources for things such as standard system colors, system
styles and themes, and standard button text?
a. The Android package
b. The default package
c. The standard package
d. The resource package
5. What are the two different types of view animations?
a. Property animation and tween animation
b. Property animation and frame-by-frame animation
c. Tween animation and fast animation
d. Frame-by-frame animation and tween animation
6. Which category of animations allows you to animate an object’s properties?
a. Tween animation
b. Property animation
c. View animations
d. Frame-by-frame animation
7. Which of the following is not a feature of tween animation?
a. Translation
b. Scaling
c. Repetition
d. Rotation
Loading page 20...
Chapter 6: Managing Application Resources Multiple Choice Questions 20
8. In what directory are all raw resource files included?
a. res/raw/resource
b. res/raw.resource
c. res/raw
d. resource/raw
9. In what resource do many different resources come together to form the definition of an
Android application screen?
a. Layout XML resource
b. Menu resource
c. Application resource
d. Dimension resource
10. With what class file are resources compiled and accessed?
a. @Android
b. R.java
c. XML
d. Resources.java
8. In what directory are all raw resource files included?
a. res/raw/resource
b. res/raw.resource
c. res/raw
d. resource/raw
9. In what resource do many different resources come together to form the definition of an
Android application screen?
a. Layout XML resource
b. Menu resource
c. Application resource
d. Dimension resource
10. With what class file are resources compiled and accessed?
a. @Android
b. R.java
c. XML
d. Resources.java
Loading page 21...
20 more pages available. Scroll down to load them.
Preview Mode
Sign in to access the full document!
100%
Study Now!
XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
AI Assistant
Document Details
Subject
Information Technology