-
1.
Which of these is the incorrect method for an Application to save local data?
Save in the hash table file using the Dictionary class.
Save in the database using SQLite.
Extend PreferencesActivity and save in an XML file.
Save as a file in the local file system.
Answer
-
2.
Which of the following tools creates certificates for signing Android applications?
keytool
certgen
logcat
adb
Answer
-
3.
Which of the following classes should be extended to create a custom view?
ViewGroup
Context
Activity
View
Answer
-
4.
Which of the following is NOT a valid usage for Intents?
Activate a Service
Activate a Broadcast receiver
Activate an Activity
Activate a SQLite DB Connection
Answer
-
5.
What two methods you have to override when implementing Android context menus?
onCreateOptionsMenu, onContextItemSelected
onCreateOptionsMenu, onOptionsltemSelected
onCreateOptionsMenu, onCreateContextMenu
onCreateContextMenu, onContextItemSelected
Answer
-
6.
Which of the following is true about this code snippet? (Choose two)
Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel: 555-1234"));
startActivity(intent);
The system will perform an intent resolution to start the proper activity.
The system will not dial the number without adding permission CALL_PHONE.
The code will not compile.
This is an explicit intent that start the system's dialer.
Answer
-
7.
Which of the following is not true about using a WebView in your application?
You can retrieve WebSettings with getSettings(), then enable/disable JavaScript
You use loadData to load HTML
You use loadURL to load a webpage
You need to add permission "android.permission.ACCESS_NETWORK_STATE"
Answer
-
8.
You can create a custom view by extending class:
android.widget.View
android.content.Context
android.widget.LinearLayout
android.view.View
Answer
-
9.
What is the name of the folder that contains the R.java file?
bin
res
gen
src
Answer
-
10.
Which method is used to close an activity?
stop()
finish()
destroy()
close()
Answer
-
11.
Which of the following attributes is used to set an activity screen to landscape orientation?
screenOrientation="landscape"
android:ScreenOrientation="landscape"
screenorientation = landscape
android:ScreenOrientation="landscape"
Answer
-
12.
Which of the following is true about implicit intents? (Choose two)
They must contain extra information saved in a Bundle object.
They have components specified to run an exact class.
They do not have a component specified
They must include information that allows Android system to choose the best component to run.
Answer
-
13.
Consider the following the code:
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.game_menu, menu);
return true;
}
Which of the following is true about the code above?
This method handles clicks and assign actions to menu items.
This function inflates an XML file in the res/menu folder into menu items.
The code is auto generated and should not be edited.
This method inflates an XML file in the res/layout folder into layout.
Answer
-
14.
What is the parent class of all Activity widgets?
Layout
View
Widget
ViewGroup
Answer
-
15.
Which of the following is NOT true about the Menultem interface?
Menultem can set a checkbox.
Menultem can decide the Intent issued when clicking menu components.
The Menultem instance will be returned by the Menu class add(...) method.
Menultem can display either an icon or text.
Answer
-
16.
Which of the following is not a ContentProvider provided natively by Android?
The telephone log
The Contacts list
The bookmarks
The application list
Answer
-
17.
Which of the following is not true about <activity> tag in AndroidManifest file?
Declares a single hardware or software feature that is used by the application.
Contained in <application> tag.
Declares an activity that implements part of the application's visual user interface
Has an attribute that specifies the name of the Activity sub-class that implements the activity.
Answer
-
18.
Which of the following is NOT true about class Asynctask?
It must be created on the UI thread.
It uses three generic types.
It must be used by sub-classing it.
Its sub-class override at least two methods: doInbackground, onPostExecute.
Answer
-
19.
Method onDraw() of class android.view.View has the following signature:
public boolean onDraw(Canvas)
public Canvas onDraw()
public void onDraw(Color)
public void onDraw(Canvas)
Answer
-
20.
When publishing an update to your application to the market, the following must be taken into consideration:
The package name must be the same and the .apk must be signed with the same private key.
The package name must be the same, but the .apk may be signed with a different private key.
The package name does not have to be the same and the .apk can be signed with a different private key.
The package name does not have to be the same, but the .apk must be signed with the same private key.
Answer