Content Provider in Android - questions and answers

Content Provider in Android - questions and answers


Q.1 To share data across packages in Android which object you will prefer?

A) SharedPreference
B) ContentProvider
C) DataProvider
D) None of the above.
View Answer / Hide Answer

ANSWER: B




Q.2 To query a content provider, you specify the query string in the form of a URI. The format of the query URI is as follows:

<standard_prefix>://<authority>/<data_path>/<id>

What you will write in place of <standard_prefix> ?

A) content
B) object
C) ContentProvider
D) None of the above.
View Answer / Hide Answer

ANSWER: A




Q.3 For reading the contacts from the Contacts, Which permission you will set in AndroidManifest.xml file if you are using ContentProvider.

A) FIND_CONTACTS
B) GET_CONTACTS
C) READ_CONTACTS
D) None of the above.
View Answer / Hide Answer

ANSWER: C




Q.4 SimpleCursorAdapter object maps a cursor to which view, defined in your XML file?

A) TextViews
B) ImageViews
C) Both A and B option are correct.
D) None of the above.
View Answer / Hide Answer

ANSWER: C




Q.5 What are the predefined query string constants available in Android?

A) ContactsContract.Contacts.CONTENT_URI
B) Browser.SEARCHES_URI
C) MediaStore.Images.Media.INTERNAL_CONTENT_URI
D) All of the above.
View Answer / Hide Answer

ANSWER: D




Q.6 Choose the correct option according to the given option.

Statement 1: A content provider behaves very much like a database — you can query it,
edit its content, as well as add or delete content.

Statement 2: Content providers let you centralize content in one place and have many
different applications access it as needed.

Statement 3: A content provider does not provide the facility to centralize content.

A) Only option 1 is correct.
B) Only option 2 is correct.
C) Option 1 and 2 are correct.
D) Option 1 and 3 are correct.
View Answer / Hide Answer

ANSWER: C




Q.7 For Creating your own content provider which class you will inherit?

A) Content
B) ContentProvider
C) Object.
D) None of the above.
View Answer / Hide Answer

ANSWER: B




Q.8 What is Android Interface Definition Language (AIDL)?

A) AIDL does not the Java programming language.
B) It does not define the programming interface.
C) It defines the programming interface that both the client and service agree upon in order to communicate with each other using inter process communication (IPC).
D) None of the above.
View Answer / Hide Answer

ANSWER: C


Post your comment