F. Answers to Quiz Questions

Chapter 1: Presenting Android

1. Android Open Source Project

2. True

3. Android, Inc.

4. G1 was the name. HTC was the manufacturer. T-Mobile was the carrier.

5. Fire OS

Chapter 2: Setting Up for Development

1. Version 7

2. Unknown sources

3. USB debugging

4. android.jar

5. junit.*

6. Google Mobile Ads SDK

Chapter 3: Creating Your First Application

1. The e means ERROR, w means WARN, i means INFO, v means VERBOSE, and d means DEBUG.

2. Step into is F7. Step over is F8. Step out is Shift+F8.

3. Ctrl+Alt+O on Windows and ^+Option+O on a Mac.

4. Clicking on the far-left column of the intended line of code or pressing Ctrl+F8 on Windows and Command+F8 on a Mac.

5. Go to Settings, Developer Options, and under Debugging, turn on USB debugging.

Chapter 4: Understanding Application Components

1. Context

2. getApplicationContext()

3. getResources()

4. getSharedPreferences()

5. getAssets()

6. The “back stack”

7. onSaveInstanceState()

8. sendBroadcast()

Chapter 5: Defining the Manifest

1. <uses-configuration>

2. <uses-feature>

3. <supports-screens>

4. <permission>

5. android.permission.USE_FINGERPRINT

Chapter 6: Managing Application Resources

1. False

2. Property animations, tweened animations, color state lists, drawables, mipmaps, layouts, menus, arbitrary raw files, simple values, arbitrary XML

3. getString()

4. getStringArray()

5. PNG, Nine-Patch Stretchable Images, JPEG, GIF, WEBP

6. @resource_type/variable_name

Chapter 7: Exploring Building Blocks

1. findViewById()

2. getText()

3. EditText

4. AutoCompleteTextView, MultiAutoCompleteTextView

5. False

6. False

Chapter 8: Positioning with Layouts

1. False

2. True

3. setContentView()

4. False

5. android:layout_attribute_name="value"

6. False

7. ScrollView

8. Toolbar, SwipeRefreshLayout, RecyclerView, CardView, ViewPager, DrawerLayout

Chapter 9: Partitioning with Fragments

1. FragmentManager

2. getFragmentManager() or getSupportFragmentManager()

3. The fully qualified Fragment class name

4. False

5. DialogFragment, ListFragment, PreferenceFragment, WebViewFragment, BrowserFragment, DetailsFragment, VerticalGridFragment, SeachFragment, RowsFragment, HeadersFragment, GuidedStepFragment, ErrorFragment, and PlaybackOverlayFragment

6. ListView

7. Using the Android Support Library package

Chapter 10: Architecting with Patterns

1. The activities must reside on the same hierarchy level within the application, and a simple call to startActivity() is all that is required.

2. Define the parentActivityName and use the correct Activity.

3. onBackPressed()

4. setDisplayHomeAsUpEnabled(true);

5. getActionBar().hide();

6. False

7. dismiss()

8. AlertDialog

Chapter 11: Appealing with Style

1. False

2. ActionBar

3. statusBarColor

4. False

5. Toolbar

Chapter 12: Embracing Material Design

1. You add the compile 'com.android.support:cardview-v7:23.0.0' line to the dependencies of the build.gradle file of your app module.

2. android:transitionName="transition"

3. AppCompatActivity

4. getItemCount()

5. False; getItemId() is the method to override.

6. Implement a RecyclerView.Adapter and a RecyclerView.ViewHolder, and override the appropriate RecyclerView.Adapter methods for binding data to the view.

Chapter 13: Designing Compatible Applications

1. True

2. 99%

3. <supports-screens>

4. False

5. ldltr, ldrtl

6. False

7. onConfigurationChanged()

8. False

Chapter 14: Using Android Preferences

1. Boolean, Float, Integer, Long, String, String Set

2. True

3. /data/data/<package name>/shared_prefs/<preferences filename>.xml

4. android:key, android:title, android:summary, android:defaultValue

5. addPreferencesFromResource()

6. android:fullBackupContent

Chapter 15: Accessing Files and Directories

1. 0, 32768

2. False

3. /data/data/<package name>/

4. openFileOutput()

5. getExternalCacheDir()

6. False

Chapter 16: Saving with SQLite

1. execSQL()

2. getWritableDatabase()

3. False

4. False

Chapter 17: Leveraging Content Providers

1. MediaStore

2. True

3. READ_CONTACTS

4. addWord()

5. False

Chapter 18: Learning the Development Workflow

1. False

2. The lowest common denominator method and the customization method

3. Early, when project requirements are just determined and target devices are determined

4. False

5. Write and compile the code, run the application in the software emulator, test and debug the application in the software emulator or test device, package and deploy the application to the target devices, test and debug the application on the target devices, and incorporate changes from the team and repeat until the application is complete.

Chapter 19: Planning the Experience

1. User, team, and other stakeholder objectives

2. Name, gender, age range, occupation, Android sophistication level, favorite applications, most-used Android features, attitude toward or awareness of your application’s objectives, education, income, marital status, hobbies, and problems the persona wants or needs a solution to

3. Domain modeling, class modeling, and entity relationship modeling

4. User flows and screen maps

5. Sketches, wireframes, and design comps

6. UI storyboarding and prototyping

Chapter 20: Delivering Quality Applications

1. How many users install the application, how many users launch the application for the first time, how many users regularly use the application, what the most popular usage patterns and trends are, what the least popular usage patterns and features are, what devices are the most popular

2. Updating means modifying the Android manifest version information and redeploying the updated application on users’ devices. Upgrading means creating an entirely new application package with new features and deploying it as a separate application that the user needs to choose to install and that does not replace the old application.

3. The Android emulator using different AVDs, Android Device Monitor, Hierarchy Viewer in Pixel Perfect View, Draw Nine-Patch tool, real devices, technical specifications for specific devices

4. False

5. Android Studio, the Android emulator, physical devices, Android Device Monitor, adb, sqlite3, the Hierarchy Viewer

6. False

7. False

Chapter 21: Testing Your Applications

1. True

2. Test application integration points, test application upgrades, test device upgrades, test product internationalization, test for conformance, installation testing, backup testing, performance testing, test in-app billing, test for the unexpected, and test to increase your chances of creating a “killer app”

3. JUnit

4. test

5. False

6. TouchUtils

Chapter 22: Distributing Your Applications

1. ProGuard

2. False

3. Google Analytics SDK v4 for Android

4. versionName is used to display application version information to users, and versionCode is an integer that Google Play uses internally to handle application upgrades.

5. True

6. False

7. A Google Payments merchant account

Appendix A: Tips and Tricks: Android Studio

1. True

2. Ctrl+Shift+F12 on Windows, Command+Shift+F12 on the Mac

3. With two source file windows open, right-click the tab for a source file and select Move Right or Move Down.

4. False

5. Ctrl+Alt+L on Windows, Command+Alt+L on the Mac

6. Ctrl+Alt+V on Windows, Command+Alt+V on the Mac

7. Alt+Enter

Appendix B: Quick-Start: Android Emulator

1. F8

2. Ctrl+F11/Ctrl+F12

3. F6

4. onPause() and onStop()

5. hw.gpu.enabled

6. telnet localhost <port>

7. geo fix <longitude> <latitude> [<altitude>]

Appendix C: Quick-Start: Android Device Monitor

1. tools/

2. True

3. Attach and debug applications, monitor threads, monitor the heap, stop processes, force garbage collection

4. TrafficStats

5. False

Appendix D: Mastery: Android SDK Tools

1. True

2. platform-tools/

3. Design view, Text view

4. Hierarchy Viewer

Appendix E: Quick-Start: Gradle Build System

1. False

2. False

3. The settings.gradle file is used for defining the inclusion of application modules.

4. Gradle wrapper ensures you will always be able to build your application.

5. The android element of your application module build.gradle file

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.23.147