Android Development Fundamentals: SQLite and Content Providers

Covers Android platform features including SQLite databases, Content Providers, Intents, and resource management

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Android resources stored in_______ of Android Application directory structure, are not compiled into binary format.

  1. /res/raw
  2. /res/xml
  3. /res/layout
  4. Both, a & b above
  5. None of above
Question 2 True/False

Intent is an action with its associated data URI. You can use intents to invoke internal or external components from your application.

  1. True
  2. False
Question 3 True/False

Linkify is a helper class that automatically creates hyperlinks within Text View (and Text View-derived) classes

  1. True
  2. False
Question 4 True/False

Pending Intent is commonly used to package an Intent that will be fired in response to a future event, such as a widget View being clicked or a Notification being selected from the notification panel.

  1. True
  2. False
Question 5 Multiple Choice (Single Answer)

In addition to its primary attributes of action and data URI, intent can include additional attributes called extras. An extra can provide more information to the component that receives the intent. It is accessed using -

  1. Intent.getIntentExtras()
  2. Intent.getExtras()
  3. Bundle.getExtras()
  4. None of above
Question 6 True/False

During start-up, Android looks for activities whose category (also known as a tag) is marked as CATEGORY_LAUNCHER. It then picks up these activity names and icons and places them on the home screen to launch.

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

The SQLite3 has been implemented as a ______________ that's included as part of the Android software stack

  1. Compact C Library
  2. C++ Library
  3. Java Library
  4. None of above
Question 8 True/False

In SQLite3 database, Files (such as bitmaps or audio files) are usually stored within database tables.

  1. True
  2. False
Question 9 Multiple Choice (Single Answer)

What is the use of –e option in following adb command – adb –e shell

  1. Informs adb to use the connected real device
  2. Informs adb to use the emulator
  3. Returns an error
  4. None of above
Question 10 Multiple Choice (Single Answer)

________ objects are used to insert new rows into database tables

  1. ContentValues
  2. ContentValue
  3. CursorFactory
  4. None of above
Question 11 True/False

In SQLite database, there is a strict type checking when assigning or extracting values from each column within a row.

  1. True
  2. False
Question 12 Multiple Choice (Single Answer)

Select Native Android Content Provider(s) from the list below.

  1. Browser
  2. MediaStore
  3. Contacts
  4. CallIndex
  5. All of above
  6. a, b & c Above
Question 13 True/False

You may declare ContentProvider with a element in the application's AndroidManifest.xml file

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

_______ is the Android way of doing IPC that is interface based and lightweight

  1. Android Interface Description Language
  2. Android Inter-process Description Language
  3. Android Definition Language
  4. None of above
Question 15 Multiple Choice (Single Answer)

Identify “Authority” part of below Content URI - content://contacts/people/3

  1. People
  2. Contacts
  3. Contacts.people
  4. 3
  5. None of above
Question 16 Multiple Choice (Single Answer)

Select the static Helper method(s) to append an ID to a ContentProvider URI

  1. ContentUris.withAppendedId()
  2. Uri.withAppendedPath()
  3. Both a and b above
  4. None of above
Question 17 True/False

Content providers that are not declared in the manifest file are also visible to the Android system

  1. True
  2. False
Question 18 Multiple Choice (Single Answer)

To query content provider, both methods ________ and ______ return a Cursor object and takes the same set of arguments.

  1. ContentResolver.query(), Activity.managedQuery()
  2. Activity.query(), ContentResolver.managedQuery()
  3. ContentResolver.makeQuery(), Activity.managedQuery()
  4. None of above
Question 19 True/False

Requests to ContentResolver are automatically forwarded to the appropriate Content Provider instance

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

If you don't need to share data amongst multiple applications, then you can use a database directly using -

  1. Content Provider
  2. Intent
  3. SQLite Database
  4. None of above