Android naming has followed an alphabetical order from Android 1.0 to Lollipop.
1.Fully True if you consider first letters of every version release up till Lollipop(5.0)
2.Partially True if you consider first letters of every version release up till Lollipop(5.0)
3.False
4.None of the above
AsyncTask methods can run on the UI thread, but one of them doesn't run on this UI thread, which one?
1.onPreExecute()
2.publishProgress()
3.doInBackground()
4.onPostExecute()
C2DM was deprecated and replaced by:
1.Polling. . .
2.GCS
3.GCM
4.APS.
Can the ActionBarCompat library propose ActionBar features for old phones?
1.No
2.Yes, it can support devices from level api 2.1
3.both (a) and (b)
4.None of the above
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?
1.When the device receives an incoming phone call.
2.When an outgoing phone call is initiated on the device.
3.When an incoming phone call is terminated.
4.The code in will never get executed.
How can Android applications "borrow" functionality from other applications?
1.Application lifecyle methods
2.Intent objects
3.Content Provider system
4.None of the above
How do you request permission for your application?
1.<request-permission> in the Android Manifest
2.<uses-permission> in the Android Manifest
3.You do not need to request permissions for any application
4.<requires-permission> in the Android Manifest
In which resource folder should we create an animation file?
1.animation
2.raw
3.values
4.anim
invalidateOptionsMenu() method of ActionBarActivity calls:
1.onPrepareOptionsMenu()
2.onCreateOptionsMenu()
3.both (a) and (b)
4.None of these
Is it possible to update this textView as follows ? new Thread(new Runnable() { @Override public void run() { textView.setText("Hello World"); } }).start();
1.Yes, it is possible and it's recommended to use its own thread to update views
2.No, because system throws a Fatal Exception: "Only the original thread that created a view hierarchy can touch its views"
3.both (a) and (b)
4.None of the above
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?
1.Call setCurrentView(mView) in the startApp() of the main application class.
2.Call setContentView(mView) in the startApp() of the main application class.
3.Call setContentView(mView) in the startApp() of the main application class.
4.Call setContentView(mView) in the onCreate() of the main application class.
What class does Android use to communicate a request for an action to be performed?
1.Request
2.Service
3.Activity
4.Intent
What is "Android-activityCreator"?
1. A command line tool to create Android project files.
2.A framework to create unit tests for Android projects.
3.A resource editor to create user interface for Android applications.
4.An emulator to execute and debug Android projects.
What is "Android-dx"?
1.A command line tool to create Android project files.
2.A framework to create unit tests for Android projects.
3.A resource editor to create user interface for Android applications.
4.A tool to generate Android byte code from .class files.
What is likely to cause the UI to behave sluggishly or crash while making network calls?
1. Network Latency
2.Virus on the server
3.Hardware malfunction
4.Activity Manager contains too much
What is the attribute of EditText called that displays a text that goes away once you write something?
1.emptyText
2.hint
3.description
4.text
What is the codename of the latest Android platform?
1.Ice Cream Sandwich
2.Lollipop
3.Honeycomb
4.KitKat
What is the default behavior of an Activity when you manually rotate the device screen?
1.The activity is destroyed and reloaded entirely
2.The activity is remained unchanged
3.onPause() and onResume() activity callback are called only
4.onStop() and onStart() activity callback are called only
What is the key used for a bundle extra parameter on a PendingIntent holding a location?
1.public static final String KEY_LOCATION_CHANGED
2.https://quizack.com/android-programming/mcq/what-is-the-key-used-for-a-bundle-extra-parameter-on-a-pendingintent-holding-a-location#:~:text=public%20static%20final%20String%20KEY_STATUS_CHANGED
3.public static final String KEY_PROXIMITY_ENTERING
4.public static final String KEY_PROVIDER_ENABLED
What is the latest layout proposed by the android sdk?
1.GridLayout
2.RelativeLayout
3.LinearLayout
4.DrawerLayout
What is the maximum size of an Android app?
1.40 mb
2.4 gb
3.1.3 gb
4.100 mb
What is the message content for Discount: %1$d € String message = context.getString(R.string.discount, 10); ?
1.Discount: 10% €
2.Discount: 10 €
3.Discount: 10%
4.None of These
What is the purpose of the ContentProvider class?
1.To play rich media content files.
2. To create and publish rich media files.
3.To share data between Android applications.
4.To access the global information about an application environment.
What should dimensions be specified in so that layouts adapt to any screen size?
1.Pixels
2.Density-independent pixels
3.both (a) and (b)
4.None of the above
What should you do if you want access list of paired Bluetooth devices on Android?
1.add <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> to the manifest.xml
2.add <uses-permission android:name="android.permission.BLUETOOTH" /> permission to the manifest.xml. you can not access paired bluetooth devices list
3.both (a) and (b)
4.None of the above
What should you do in order to get paired Bluetooth device list?
1.Add <user-permission android:name="android.permission.BLUETOOTH_ADMIN" /> permission to the manifest.xml
2.None of the above
3.Not possible
4.Add <user-feature android:name="android.permission.BLUETOOTH" /> feature to the manifest.xml
What version(s) will you NOT be able to run the app if you set min sdk version to be 8 for an app
1.7
2.10
3.14
4.12
When an asynchronous task is executed, the task goes through several steps. Which option is not a step of an asynchronous task?
1.onPostExecute()
2.onPreExecute()
3.onProgressUpdate()
4.onBackground()
Where should you specify which activity should launch first in your app?
1.Manifest file
2.Main Class file
3.All of the above
4.Properties file
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?
1.android.app.LoaderManager
2.android.app.ListActivity
3.android.app.LocalActivityManager
4.None of the above
Which AsyncTask method does not run on the UI thread?
1.publishProgress()
2.onPostExecute()
3. onPreExecute()
4.doInBackground()
Which callbacks in AsyncTask get executed on main thread?
1.onProgressUpdate
2.doInBackground
3.onPostExecute
4.both onPostExecute and onProgressUpdate
Which class should you extend when using/creating a database?
1.SQLiteOpenHelper
2.SQLiteHelper
3. SQLiteDatabase
4.SQLiteDatabasehelper
Which database is available for developers in Android?
1.SQL Server
2.NoSQL
3.SQLite
4.Oracle
Which event listener is used when an Android device has changed orientation?
1.OrientationEventListener
2.https://quizack.com/android-programming/mcq/which-event-listener-is-used-when-an-android-device-has-changed-orientation#:~:text=PositioningEventListener
3.DeviceOrientationEventListener
4.LayoutEventListener
Which extension does the Android Manifest file have?
1.jar
2.xml
3.apk
4.java
Which externalizing resources are needed for application development?
1.Different language versions of the application
2.None of these
3.Different devices
4.All of these
Which folder should the App Icon be kept under?
1.src
2.anim
3. res
4.None of These
Which function is used to send value from one activity to another?
1.intent.send()
2.send()
3.intent.transfer()
4.intent.putextra()
Which is a benefit of deodexing?
1.Custom themes
2.Remove files
3.Install custom apps
4.Speed boost
Which is the build system recommended by Google?
1.ant
2.gradle
3.maven
4.None of These
Which is the descriptive file that presents essential information about your app to the Android system?
1.AndroidManifest.xml
2.local.properties
3.build.gradle
4.build.xml
Which is the name of component used to display web pages in the application?
1.WebView
2.WebBrowser
3.BrowserView
4.Browser
Which manifest uses-configuration should you use if your application requires a finger activated touch screen on the device?
1.<uses-configuration android:reqNavigation="finger" /> must be in your manifest
2.<uses-configuration android:reqTouchScreen /> must be in your manifest
3.<uses-configuration android:reqTouchScreen="finger" /> must be in your manifest
4.None of the above
Which method can get the context tied to the lifecycle of the entire application ?
1.View.getContext()
2.Activity.this
3.Activity.getApplicationContext()
4.ContextWrapper.getBaseContext()
Which method from Activity is used to update the UI ?
1.runOnUIThread()
2.invalidateAll()
3.invalidate()
4.repaint()
Which method is called first when an Activity is started?
1.onCreate();
2.onStart();
3.Both a and b
4.onResume();
Which method is called to notify a Fragment is visible when they are inside a ViewPager?
1.setUserVisibleHint(boolean isVisibleToUser)
2.onVisible(boolean isVisible)
3.onAttach(Activity activity)
4.isAdded()
Which method should be used to refresh the ActionBar if you use ActionBarCompat library?
1.invalidateOptionsMenu()
2.invalidateActionBar()
3.invalidate()
4.invalidateMenuItems()
Which of the following are classes that can be used to handle the Bluetooth functionality on a device?
1.Adapter
2.Manager
3.Matcher
4.BluetoothAdapter
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?
1.onCreate
2.onInit
3.onPause
4.All of the above
Which of the following are true about Intent.CALL_ACTION and Intent.DIAL_ACTION?
1.Intent.action == Intent.CALL_ACTION is true when a phone call is received on the device.
2.Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without showing a UI on the device.
3.Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without showing a UI on the device.
4.Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call.
Which of the following are valid features that you can request using requestWindowFeature?
1.FEATURE_NO_TITLE
2.FEATURE_NO_ICON
3.FEATURE_RIGHT_ICON
4.FEATURE_NO_MENU
Which of the following can be accomplished by using the TelephoneNumberUtil class?
1.Save a phone number to the contacts in the phone device.
2.Retrieve a phone number from the contacts in the phone device.
3.Delete a phone number from the contacts in the phone device.
4.Format an international telephone number.
Which of the following can be used to bind data from an SQL database to a ListView in an Android application?
1.SimpleCursor
2.SimpleCursorAdapter
3.SimpleAdapter
4.SQLiteCursor
Which of the following can be used to navigate between screens of different Android applications?
1.Binder
2.Flow
3.Navigate
4.Intent
Which of the following can you use to display an HTML web page in an Android application?
1.WebBrowser
2.BrowserView
3.WebView
4.Browser
Which of the following defines your Android application components?
1.myApp.xml file
2.AndroidManifest.pkg file
3.AndroidManifest.xml file
4.None of these
Which of the following fields of the Message class should be used to store custom message codes about the Message?
1.tag
2.what
3.arg1
4.arg2
Which of the following is a layout that organizes its children into a horizontal or vertical stack?
1.RelativeLayout
2.TableLayout
3.LinearLayout
4.FrameLayout
Which of the following is Android's main programming language ?
1.Java
2.JavaScripts
3.VB-Script
4.C++
Which of the following is not a valid stage in an Activity's lifecycle?
1.onStop
2.onPause
3.onStart
4.onFinish
Which of the following is the correct way to get pass string in an Intent, where key and value are both string variables?
1.intent.putString(key,value);
2.intent.putKey(key,value);; i
3. intent.putExtra(key,value)
4.ntent.putValue(key,value);
Which of the following is the immediate base class for Activity and Service classes?
1.Application
2.ApplicationContext
3.Contex
4.Component
Which of the following is the parent class for the main application class in an Android application that has a user interface?
1.MIDLet
2.AndroidApp
3.Activity
4.AppLet
Which of the following should be used to save the unsaved data and release resources being used by an Android application?
1.Activity.onStop()
2.Activity.onPause()
3.Activity.onDestroy()
4.Activity.onShutdown()
Which of the following system services does Android rely on for the Linux kernel?
1.Neither security nor network stack
2.Security
3.Network stack
4.Both security and network stack
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?
1.import android.drivers;
2.import android.hardware.camera;
3. import android.camera;
4.import android.hardware;
Which of the following would you have to include in your project to use the SimpleAdapter class?
1.import android.content;
2.import android.widget;
3.import android.database;
4.import android.database.sqlite;
Which of these Activity lifecycle events is when the activity is about to become visible to the user from a hidden state?
1.Start()
2.onCreate()
3.Resume()
4.onStart()
Which package encompasses the interactive UI components of Android such as buttons and text fields?
1.android.widget
2.android.view
3.android.view.ViewGroup
4.None of these
Which theme's attribute changes the color of the status bar in Lollipop?
1.android:colorPrimaryDark
2.android:colorPrimary
3.android:colorAccent
4.None of these
Which tool of Android sdk allows installing applications, viewing logs and pooling files from Android device?
1.ddms
2.Android manager
3.logcat
4.adb
Which type of file are Android layouts read from?
1. Time's Up!
2.res
3.xaml
4.txt
Why is a Parcelable used?
1.To show a message dialog
2.To store data in SQLite database
3.To transmit structured objects between activities or fragments
4.To parse a json file