Android MCQ

1) Android is -

  1. an operating system
  2. a web browser
  3. a web server
  4. None of the above

Answer: (a) an operating system

Explanation: Android is a software package and linux based operating system for mobile devices such as tablet computers and smartphones.


2) Under which of the following Android is licensed?

  1. OSS
  2. Sourceforge
  3. Apache/MIT
  4. None of the above

Answer: (c) Apache/MIT

Explanation: The Android platform was released under the Apache 2.0 license, and it is responsible for the copyright of the Android Open Source project. The Apache Foundation permits and grants licenses for software uses and distribution by the copyright under the Android Open Source Project.


3) For which of the following Android is mainly developed?

  1. Servers
  2. Desktops
  3. Laptops
  4. Mobile devices

Answer: (d) Mobile devices

Explanation: Android is a software package and a Linux-based operating system specially designed for touch-screen mobile devices like smartphones and tablets.


4) Which of the following is the first mobile phone released that ran the Android OS?

  1. HTC Hero
  2. Google gPhone
  3. T - Mobile G1
  4. None of the above

Answer: (c) T - Mobile G1

Explanation: The first Android mobile was publicly released with Android 1.0 of the T-Mobile G1 (aka HTC Dream) in October 2008.


5) Which of the following virtual machine is used by the Android operating system?

  1. JVM
  2. Dalvik virtual machine
  3. Simple virtual machine
  4. None of the above

Answer: (b) Dalvik virtual machine

Explanation: The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile devices. It optimizes the virtual machine for memory, battery life, and performance. Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan Bornstein.


6) Android is based on which of the following language?

  1. Java
  2. C++
  3. C
  4. None of the above

Answer: (a) Java

Explanation: Java language is mainly used to write the android code even though other languages can be used.


7) APK stands for -

  1. Android Phone Kit
  2. Android Page Kit
  3. Android Package Kit
  4. None of the above

Answer: (c) Android Package Kit

Explanation: An APK is a short form of the Android Package Kit. An APK file is the file format used to install the applications on the android operating system.


8) What does API stand for?

  1. Application Programming Interface
  2. Android Programming Interface
  3. Android Page Interface
  4. Application Page Interface

Answer: (a) Application Programming Interface

Explanation: API stands for application program interface. It is a set of routines, protocols, and tools for building software and applications. It may be any type of system like a web-based system, operating system, or database system.


9) Which of the following converts Java byte code into Dalvik byte code?

  1. Dalvik converter
  2. Dex compiler
  3. Mobile interpretive compiler (MIC)
  4. None of the above

Answer: (b) Dex compiler

Explanation: The Dex compiler converts the class files into a .dex file that runs on the Dalvik VM. Multiple class files are converted into one dex file.


10) How can we stop the services in android?

  1. By using the stopSelf() and stopService() method
  2. By using the finish() method
  3. By using system.exit() method
  4. None of the above

Answer: (a) By using the stopSelf() and stopService() method

Explanation: A service is started when a component (like activity) calls the startService() method; now, it runs in the background indefinitely. It is stopped by the stopService() method. The service can stop itself by calling the stopSelf() method.


11) What is an activity in android?

  1. android class
  2. android package
  3. A single screen in an application with supporting java code
  4. None of the above

Answer: (c) A single screen in an application with supporting java code

Explanation: An activity is a single screen in android. It is like a window or frame of Java. By the help of activity, you can place all your UI components or widgets in a single screen. Activity is like a frame or window in java that represents GUI. It represents one screen of android.


12) How can we kill an activity in android?

  1. Using finish() method
  2. Using finishActivity(int requestCode)
  3. Both (a) and (b)
  4. Neither (a) nor (b)

Answer: (c) Both (a) and (b)

Explanation: The finish() method is used to close the activity. Whereas the finishActivity(int requestCode) also closes the activity with requestCode.


13) ADB stands for -

  1. Android debug bridge
  2. Android delete bridge
  3. Android destroy bridge
  4. None of the above

Answer: (a) Android debug bridge

Explanation: ADB stands for Android Debug Bridge. It is a command-line tool that is used to communicate with the emulator instance.


14) On which of the following, developers can test the application, during developing the android applications?

  1. Third-party emulators
  2. Emulator included in Android SDK
  3. Physical android phone
  4. All of the above

Answer: (d) All of the above

Explanation: We can use the Android emulator, physical android phone, or third-party emulator as a target device to execute and test our Android application.


15) Which of the following kernel is used in Android?

  1. MAC
  2. Windows
  3. Linux
  4. Redhat

Answer: (c) Linux

Explanation: Android is a customized Linux 3.6 kernel. It is the heart of android architecture that exists at the root of android architecture. Linux kernel is responsible for device drivers, power management, memory management, device management, and resource access.


16) Which of the following is the first callback method that is invoked by the system during an activity life-cycle?

  1. onClick() method
  2. onCreate() method
  3. onStart() method
  4. onRestart() method

Answer: (b) onCreate() method

Explanation: onCreate() method is called when activity is first created. The onCreate() and onDestroy() methods are called only once throughout the activity lifecycle.


17) Which of the following is not an activity lifecycle callback method?

  1. onClick() method
  2. onCreate() method
  3. onStart() method
  4. onBackPressed() method

Answer: (d) onBackPressed() method

Explanation: None


18) We require an AVD to create an emulator. What does AVD stand for?

  1. Android Virtual device
  2. Android Virtual display
  3. Active Virtual display
  4. Active Virtual device

Answer: (a) Android Virtual device

Explanation: An Android Virtual Device (AVD) is an emulator configuration that represents a specific Android device. We can use the Android emulator as a target device to execute and test our Android application on our PC.


19) Does android support other languages than java?

  1. Yes
  2. No
  3. May be
  4. Can't say

Answer: (a) Yes

Explanation: Yes, an android app can be developed in C/C++ also using android NDK (Native Development Kit). It makes the performance faster. It should be used with Android SDK.


20) What is the use of content provider in Android?

  1. For storing the data in the database
  2. For sharing the data between applications
  3. For sending the data from an application to another application
  4. None of the above

Answer: (c) For sending the data from an application to another application

Explanation: A content provider is used to share information between Android applications.


21) AAPT stands for -

  1. Android Activity Packaging Tool
  2. Android Asset Packaging Tool
  3. Android Action Packaging Tool
  4. None of the above

Answer: (b) Android Asset Packaging Tool

Explanation: AAPT is an acronym for "Android Asset Packaging Tool". It handles the packaging process.


22) NDK stands for -

  1. Native Development Kit
  2. New Development kit
  3. Native Design Kit
  4. None of the above

Answer: (a) Native Development Kit

Explanation: NDK stands for Native Development Kit. By using NDK, you can develop a part of an app using a native language such as C/C++ to boost performance.


23) Which of the following is contained in the src folder?

  1. XML
  2. Java source code
  3. Manifest
  4. None of the above

Answer: (b) Java source code

Explanation: None


24) Which of the following method is used to handle what happens after clicking a button?

  1. onClick
  2. onCreate
  3. onSelect
  4. None of the above

Answer: (a) onClick

Explanation: None


25) Which of the following android component displays the part of an activity on screen?

  1. View
  2. Manifest
  3. Intent
  4. Fragment

Answer: (d) Fragment

Explanation: Android Fragment is the part of activity; it is also known as sub-activity. There can be more than one fragment in an activity. Fragments represent multiple screens inside one activity.


26) Which of the following is the parent class of Activity?

  1. context
  2. object
  3. contextThemeWrapper
  4. None of the above

Answer: (c) contextThemeWrapper

Explanation: The android Activity is the subclass of ContextThemeWrapper class. Android Activity Lifecycle is controlled by 7 methods of android.app.Activity class. An activity is a single screen in android. It is like a window or frame of Java.


27) Which of the following is the parent class of service?

  1. context
  2. object
  3. contextThemeWrapper
  4. contextWrapper

Answer: (d) contextWrapper

Explanation: The android.app.Service is subclass of ContextWrapper class. Android service is a component used to perform operations on the background, such as playing music, handling network transactions, interacting content providers, etc.


28) OHA in android stands for -

  1. Open Health Academy
  2. Open Handset Alliance
  3. Open Handset Application
  4. Open Handset Association

Answer: (b) Open Handset Alliance

Explanation: OHA stands for "Open Handset Alliance". It's a consortium of 84 companies such as google, samsung, AKM, synaptics, KDDI, Garmin, Teleca, eBay, Intel, etc.


29) In which of the following tab an error is shown?

  1. CPU
  2. Memory
  3. ADB Logs
  4. Logcat

Answer: (d) Logcat

Explanation: Logcat is a command-line tool that dumps a log of system messages. It includes the messages that you have written from your app with the Log class and also includes the stack traces when the devices throw an error. Logcat helps to analyze the problems and also helps to display the log messages of our android device.


30) In which year OHA (Open Handset Alliance) is announced?

  1. 2005
  2. 2007
  3. 2006
  4. None of the above

Answer: (b) 2007

Explanation: OHA (Open Handset Alliance) was established on 5th November 2007, led by Google. It is committed to advance open standards, provide services and deploy handsets using the Android Platform.


31) Which of the following is the name of the Android version 1.5?

  1. Eclair
  2. Froyo
  3. Cupcake
  4. Donut

Answer: (c) Cupcake

Explanation: On April 27, 2009, the Android updated to 1.5 with the codename of the dessert item (Cupcake). It has a Linux kernel 2.6.27.


32) Which of the following is the name of the Android version 1.6?

  1. Eclair
  2. Froyo
  3. Cupcake
  4. Donut

Answer: (d) Donut

Explanation: On September 15, 2009, Android 1.6 was released with the name Donut. It contains numerous new features such as voice and text entry search, bookmark history, contacts, web, "speak" a string of text, faster camera access, user can select multiple photos for deletion, support text-to-speech engine, WVGA screen resolutions.


33) Which of the following is the topmost layer of android architecture?

  1. System Libraries and Android Runtime
  2. Linux Kernel
  3. Applications
  4. Applications Framework

Answer: (c) Applications

Explanation: On the top of the application framework, there are applications. All applications such as home, contact, settings, games, browsers are using an android framework that uses android runtime and libraries.


34) Which of the layer is below the topmost layer of android architecture?

  1. System Libraries and Android Runtime
  2. Linux Kernel
  3. Applications
  4. Applications Framework

Answer: (d) Applications Framework

Explanation: On the top of Native libraries and android runtime, there is an application framework. Android framework includes Android API's such as UI (User Interface), telephony, resources, locations, Content Providers (data), and package managers. It provides a lot of classes and interfaces for android application development.


35) Which of the layer is the lowest layer of android architecture?

  1. System Libraries and Android Runtime
  2. Linux Kernel
  3. Applications
  4. Applications Framework

Answer: (b) Linux Kernel

Explanation: It is the heart of android architecture that exists at the root of android architecture. Linux kernel is responsible for device drivers, power management, memory management, device management, and resource access.


36) What is contained in manifest.xml?

  1. Source code
  2. List of strings used in the app
  3. Permission that the application requires
  4. None of the above

Answer: (c) Permission that the application requires

Explanation: The AndroidManifest.xml file contains information of your package, including components of the application such as activities, services, broadcast receivers, content providers, etc. It is responsible for protecting the application to access any protected parts by providing the permissions.


37) Which of the following is not a state in the service lifecycle?

  1. Destroyed
  2. Start
  3. Paused
  4. Running

Answer: (c) Paused

Explanation: A service is a component that runs in the background. It is used to play music, handle network transaction, etc.


38) As an android programmer, which version of Android should we use as a minimum development target?

  1. Version 1.2 or version 1.3
  2. Version 1.0 or version 1.1
  3. Version 1.6 or version 2.0
  4. Version 2.3 or version 3.0

Answer: (c) Version 1.6 or version 2.0

Explanation: None


39) Which of the following is not a nickname of any android version?

  1. Donut
  2. Muffin
  3. Honeycomb
  4. Cupcake

Answer: (b) Muffin

Explanation: Muffin is not a nickname of any android version.


40) Which of the following is a dialog class in android?

  1. AlertDialog
  2. DatePicker Dialog
  3. ProgressDialog
  4. All of the above

Answer: (d) All of the above

Explanation: The Dialog classes that are supported in android are -

  • Alert Dialog
  • Progress Dialog
  • Date Picker Dialog
  • Time picker Dialog

41) In which state the activity is, if it is not in focus, but still visible on the screen?

  1. Stopped state
  2. Destroyed state
  3. Paused state
  4. Running state

Answer: (c) Paused state

Explanation: When an activity is not in focus that is not interacting with the user but still visible on the screen, then the activity is in paused state.


42) Which of the following is the built-in database of Android?

  1. SQLite
  2. MySQL
  3. Oracle
  4. None of the above

Answer: (a) SQLite

Explanation: SQLite is an open-source relational database, i.e., used to perform database operations on android devices such as storing, manipulating, or retrieving persistent data from the database. It is embedded in android by default. So, there is no need to perform any database setup or administration task.


43) Which of the following android version is named Jelly Bean?

  1. 3.1
  2. 2.1
  3. 1.1
  4. 4.1

Answer: (d) 4.1

Explanation: On June 27, 2012, Google announced Android 4.1(Jelly Bean) in the Google I/O conference. It is based on Linux kernel 3.0.31.


44) Which of the following features are updated in Android 4.1(Jelly Bean)?

  1. User Interface
  2. Lock screen improvement
  3. New clock application
  4. All of the above

Answer: (d) All of the above

Explanation: Android 4.1(Jelly Bean) updates to following features: smoother user interface, enhance accessibility, expandable notification, fixed bug on Nexus 7, one-finger gestures to expand/collapse notifications, lock screen improvement, multiple user accounts (tablets only), new clock application, Bluetooth low energy support, volume for incoming call, 4K resolution support, native emoji support, bug fixes for the Nexus 7 LTE.


45) Which of the following is the API level of Android version 5.0?

  1. 21
  2. 20
  3. 11
  4. 41

Answer: (a) 21

Explanation: Android "Lollipop" (Android 5) was the 5th major version of Google's Android operating system. It is the twelfth version of Android. Its API level is 21.


46) Is it true that "There can be only one running activity at a given time"?

  1. True
  2. False
  3. May be
  4. Can't say

Answer: (a) True

Explanation: None


47) Which of the following android library provides access to the database?

  1. android.content
  2. android.database
  3. android.api
  4. None of the above

Answer: (b) android.database

Explanation: None


48) In Android studio, which of the following callback is called when an activity starts interacting with the user?

  1. onDestroy
  2. onCreate
  3. onResume
  4. onStop

Answer: (c) onResume

Explanation: onResume is called when an activity will start interacting with the user.


49) The sendStickybroadcast(intent) method in android is used to show that the intent is -

  1. Optional
  2. Prioritize
  3. Sticky
  4. None of the above

Answer: (c) Sticky

Explanation: If we use the sendStickyBroadcast(Intent) method, the Intent is sticky. It means that the Intent that we are sending will stay around after the completion of the broadcast.


50) Which of the following class in android displays information for a short period of time and disappears after some time?

  1. toast class
  2. log class
  3. maketest class
  4. None of the above

Answer: (a) toast class

Explanation: An android toast provides feedback to the users about the operation being performed by them. It displays the message regarding the status of operation initiated by the user.


51) Which of the following method in android is used to log debug messages?

  1. Log.r()
  2. Log.R()
  3. Log.d()
  4. Log.D()

Answer: (c) Log.d()

Explanation: The Lod.d() method in android is used to log debug messages.


52) Which of the following method is used by services to clean up any services?

  1. onStop() method
  2. stopService() method
  3. onDestroy() method
  4. stopSelf() method

Answer: (c) onDestroy() method

Explanation: The onDestroy() method can be used by services to clean up any resources like receivers, threads, registered listeners, etc.


53) ANR in android stands for -

  1. Application Not Reacting
  2. Application Not Responding
  3. Application Not Rendering
  4. None of the above

Answer: (b) Application Not Responding

Explanation: ANR stands for Application Not Responding. It is a dialog box that appears if the application is no longer responding.


54) All layout classes are the subclasses of -

  1. android.view.View
  2. android.view.ViewGroup
  3. android.widget
  4. None of the above

Answer: (b) android.view.ViewGroup

Explanation: In Android, all layout classes are the subclasses of android.view.ViewGroup.


55) Which of the following class in android executes the task asynchronously with your service?

  1. SyncTask
  2. AsyncTask
  3. Both of the above
  4. None of the above

Answer: (b) AsyncTask

Explanation: As the name implies, AsyncTask class executes a task asynchronously. AsyncTask is an abstract class provided by Android, which helps us to use the UI thread properly. This class allows us to perform long/background operations and show its result on the UI thread without having to manipulate threads.


56) Which of the following layout in android arranges its children into rows and columns?

  1. RelativeLayout
  2. TableLayout
  3. FrameLayout
  4. None of the above

Answer: (b) TableLayout

Explanation: TableLayout in android allows us to arrange the components into rows and columns. The containers in TableLayout do not display any borderline for their cells, columns, or rows.


57) Which of the following layout in android aligns all children either vertically or horizontally?

  1. RelativeLayout
  2. TableLayout
  3. FrameLayout
  4. LinearLayout

Answer: (d) LinearLayout

Explanation: LinearLayout in android aligns all children either vertically or horizontally. The direction of the LinearLayout can be specified using the android orientation attribute.


58) What is the default value of the orientation attribute in LinearLayout?

  1. Horizontal
  2. Vertical
  3. There is no default value of orientation attribute in LinearLayout
  4. None of the above

Answer: (a) Horizontal

Explanation: LinearLayout in android aligns all children either vertically or horizontally. The direction of the LinearLayout can be specified using the android orientation attribute. Its default value of the orientation attribute of LinearLayout is horizontal.


59) What is the nine-patch images tool in android?

  1. It is an image extension tool.
  2. It is used to change the bitmap images into nine sections
  3. Both (a) and (b)
  4. None of the above

Answer: (b) It is used to change the bitmap images into nine sections

Explanation: The nine-patch images tool in android is used to change the bitmap images into nine sections with four corners, four edges, and an axis.


60) GCM in android stands for -

  1. Google Cloud Messaging
  2. Google Count Messaging
  3. Google Center Messaging
  4. None of the above

Answer: (a) Google Cloud Messaging

Explanation: GCM stands for Google Cloud Messaging. It is provided by Google for sending push notifications to and from an Android application.






Latest Courses