Android MCQ Quiz Hub

Android Programming MCQ Set 2

Choose a topic to test your knowledge and improve your Android skills

What is the codename of the latest Android platform?





✅ Correct Answer: 2

invalidateOptionsMenu() method of ActionBarActivity calls:





✅ Correct Answer: 1

Is it possible to update this textView as follows ? new Thread(new Runnable() { @Override public void run() { textView.setText("Hello World"); } }).start();





✅ Correct Answer: 2

Which method can get the context tied to the lifecycle of the entire application ?





✅ Correct Answer: 3

AsyncTask methods can run on the UI thread, but one of them doesn't run on this UI thread, which one?





✅ Correct Answer: 3

What is the latest layout proposed by the android sdk?





✅ Correct Answer: 4

Which type of file are Android layouts read from?





✅ Correct Answer: 3

Which of the following system services does Android rely on for the Linux kernel?





✅ Correct Answer: 4

Can the ActionBarCompat library propose ActionBar features for old phones?





✅ Correct Answer: 2

Which of the following is Android's main programming language ?





✅ Correct Answer: 1

Which of the following defines your Android application components?





✅ Correct Answer: 3

What should dimensions be specified in so that layouts adapt to any screen size?





✅ Correct Answer: 2

What version(s) will you NOT be able to run the app if you set min sdk version to be 8 for an app





✅ Correct Answer: 1

Which database is available for developers in Android?





✅ Correct Answer: 3

Which folder should the App Icon be kept under?





✅ Correct Answer: 3

Which extension does the Android Manifest file have?





✅ Correct Answer: 2

Which of the following is the correct way to get pass string in an Intent, where key and value are both string variables?





✅ Correct Answer: 3

Which is the name of component used to display web pages in the application?





✅ Correct Answer: 1

Which of these Activity lifecycle events is when the activity is about to become visible to the user from a hidden state?





✅ Correct Answer: 4

Which API should you use to bring the data over to the device asynchronously if you have a fragment which displays a ListViewContaining query results?





✅ Correct Answer: 1

What is likely to cause the UI to behave sluggishly or crash while making network calls?





✅ Correct Answer: 1

How can Android applications "borrow" functionality from other applications?





✅ Correct Answer: 2

Which event listener is used when an Android device has changed orientation?





✅ Correct Answer: 1

Which externalizing resources are needed for application development?





✅ Correct Answer: 4

Why is a Parcelable used?





✅ Correct Answer: 3

What class does Android use to communicate a request for an action to be performed?





✅ Correct Answer: 4

Which AsyncTask method does not run on the UI thread?





✅ Correct Answer: 4

Which method is called to notify a Fragment is visible when they are inside a ViewPager?





✅ Correct Answer: 1

Which method should be used to refresh the ActionBar if you use ActionBarCompat library?





✅ Correct Answer: 1

Which theme's attribute changes the color of the status bar in Lollipop?





✅ Correct Answer: 1

What is the default behavior of an Activity when you manually rotate the device screen?





✅ Correct Answer: 1

What should you do if you want access list of paired Bluetooth devices on Android?





✅ Correct Answer: 1

Which is a benefit of deodexing?





✅ Correct Answer: 1

When an asynchronous task is executed, the task goes through several steps. Which option is not a step of an asynchronous task?





✅ Correct Answer: 4

How do you request permission for your application?





✅ Correct Answer: 2

Which is the build system recommended by Google?





✅ Correct Answer: 2

Which tool of Android sdk allows installing applications, viewing logs and pooling files from Android device?





✅ Correct Answer: 4

Which package encompasses the interactive UI components of Android such as buttons and text fields?





✅ Correct Answer: 1

Which class should you extend when using/creating a database?





✅ Correct Answer: 1

What should you do in order to get paired Bluetooth device list?





✅ Correct Answer: 1

Android naming has followed an alphabetical order from Android 1.0 to Lollipop.





✅ Correct Answer: 1

Which is the descriptive file that presents essential information about your app to the Android system?





✅ Correct Answer: 1

What is the message content for Discount: %1$d € String message = context.getString(R.string.discount, 10); ?





✅ Correct Answer: 2

In which resource folder should we create an animation file?





✅ Correct Answer: 4

Which of the following is not a valid stage in an Activity's lifecycle?





✅ Correct Answer: 4

What is the maximum size of an Android app?





✅ Correct Answer: 1

Which callbacks in AsyncTask get executed on main thread?





✅ Correct Answer: 4

What is the key used for a bundle extra parameter on a PendingIntent holding a location?





✅ Correct Answer: 1

Which of the following is a layout that organizes its children into a horizontal or vertical stack?





✅ Correct Answer: 3

What is the attribute of EditText called that displays a text that goes away once you write something?





✅ Correct Answer: 2

Which function is used to send value from one activity to another?





✅ Correct Answer: 4

Where should you specify which activity should launch first in your app?





✅ Correct Answer: 1

Which method from Activity is used to update the UI ?





✅ Correct Answer: 1

C2DM was deprecated and replaced by:





✅ Correct Answer: 3

Which manifest uses-configuration should you use if your application requires a finger activated touch screen on the device?





✅ Correct Answer: 3

Which method is called first when an Activity is started?





✅ Correct Answer: 3

Which of the following are valid features that you can request using requestWindowFeature?





✅ Correct Answer: 1

Which of the following can be used to bind data from an SQL database to a ListView in an Android application?





✅ Correct Answer: 2

Which of the following would you have to include in your project to use the SimpleAdapter class?





✅ Correct Answer: 2

What is the purpose of the ContentProvider class?





✅ Correct Answer: 3

Which of the following is the parent class for the main application class in an Android application that has a user interface?





✅ Correct Answer: 3

Which of the following can be accomplished by using the TelephoneNumberUtil class?





✅ Correct Answer: 4

Which of the following is the immediate base class for Activity and Service classes?





✅ Correct Answer: 2

Which of the following would you have to include in your project to use the APIs and classes required to access the camera on the mobile device?





✅ Correct Answer: 4

Which of the following are classes that can be used to handle the Bluetooth functionality on a device?





✅ Correct Answer: 4

Which of the following are life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity?





✅ Correct Answer: 4

Which of the following should be used to save the unsaved data and release resources being used by an Android application?





✅ Correct Answer: 2

Which of the following fields of the Message class should be used to store custom message codes about the Message?





✅ Correct Answer: 2

Consider the code snippet below: public class MyReceiver extends PhoneStateIntentReceiver { @Override public void onReceiveIntent(Context context, Intent intent) { if (intent.action == Intent.CALL_ACTION) { } } } Assuming that notifyPhoneCallState has been called to enable MyReceiver to receive notifications about the phone call states, in which of the following cases will the code in get executed?





✅ Correct Answer: 4

Which of the following are true about Intent.CALL_ACTION and Intent.DIAL_ACTION?





✅ Correct Answer: 4

Which of the following can you use to display an HTML web page in an Android application?





✅ Correct Answer: 3

Which of the following can be used to navigate between screens of different Android applications?





✅ Correct Answer: 4

What is "Android-activityCreator"?





✅ Correct Answer: 1

What is "Android-dx"?





✅ Correct Answer: 4

Suppose MyView is a class derived from View and mView is a variable of type MyView. Which of the following should be used to display mView when the Android application is started?





✅ Correct Answer: 4