Android Programming MCQs

Android Programming MCQs

The following Android Programming MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of Android Programming. We encourage you to answer these multiple-choice questions to assess your proficiency.
Please continue by scrolling down.

1: Which subclass of a Preference class displays a list of entries as a dialog?

A.   ListPreference

B.   MultiSelectListPreference

C.   None of these

D.   Both of these

2: What is an application component that can perform long-running operations in the background and does not provide a user interface?

A.   Broadcast receiver

B.   Content-provider

C.   Activity

D.   Service

3: What is the first method called in the Activity Lifecycle?

A.   onBegin()

B.   onResume()

C.   onInit()

D.   onCreate()

E.   onStart()

4: Which Virtual Machine (VM) does the android system use?

A.   Erlang

B.   VMLite

C.   Dalvik

D.   KVM

5: What is the brand name of Google's own line of Android smartphones?

A.   Galaxy

B.   Nexus

C.   Optimus

D.   Desire

E.   Xperia

6: Which of the following are a function of the manifest file?

A.   declare the level of user permissions required.

B.   declare the minimum API level required

C.   all of these

7: What kernel is Android based on?

A.   Mach Kernel

B.   XNA

C.   NT Kernel

D.   Linux Kernel

8: Your Android application components are defined in the...

A.   myApp.xml file.

B.   AndroidManifest.xml file.

C.   AndroidManifest.pkg file.

9: In order to specify layouts so that they adapt to any screen size, specify dimensions in:

A.   Density-independent pixels

B.   Pixels

10: Which of the following are versions of Android?

A.   Eclair

B.   Gingerbread

C.   All of these

D.   Froyo

11: Which statement correctly changes content of a TextView named textLabel to show "Your Text"?

A.   textLabel.setText("Your Text");

B.   textLabel = "Your Text";

C.   textLabel.text = "Your Text";

D.   textLabel.text("Your Text");

12: The Android Manifest file has what extension?

A.   .jar

B.   .apk

C.   .java

D.   .xml

13: Do you need to buy an android developer account to start developing and testing applications on Android ?

A.   No

B.   Yes

14: Which of the following are different types of Android application components?

A.   all of these

B.   services

C.   activities

D.   none of these

15: An android application can be converted into an IOS application using a desktop application called "And-to-IOS" easily and still get the same result on IOS.

A.   False

B.   True

16: Which of the following is used to detect when a user clicks or taps on a button?

A.   OnTapListener

B.   OnTouchListener

C.   OnClickDetecter

D.   OnClickListener

17: Which of these widgets is an input box for a user to enter text?

A.   Label

B.   TextBox

C.   EditText

D.   TextView

18: Who can submit applications to the Marketplace?

A.   Anyone and everyone

B.   Registered Android Market developers

C.   Only Google employees

D.   Only device manufacturers and their employees

A.   Android Studio

B.   IntelliJ IDEA

C.   Netbeans

D.   Eclipse ADT

20: If you wanted to store a name/value string pair for your Android application, which class would you use?

A.   android.content.Resources

B.   android.content.SharedPreferences

C.   android.content.Cookies

21: Which is NOT a default value used for a Toast length parameter?




22: The Android SDK tools compile your application into an Android application (.apk file) which...

A.   contains all the information needed to install the application on an Android device.

B.   then has to be formatted for installation through the Android installer.

C.   contains information needed by the Universal Mobile Installer to create the install package for Android devices.

23: In activity A if you start Activity B with result you should override

A.   onActivityResult(int requestCode, int resultCode, Intent data) on Activity A

B.   onResultedActivity(int requestCode, int resultCode, Intent data) on Activity B onResultedActivity(int requestCode, int resultCode, Intent data) on Activity A none of the above

24: What is the main hardware platform of Android?

A.   None of these


C.   x86

D.   ARM architecture

25: True or False? It is possible to give the preferred install location, internal or external memory, in the manifest.xml

A.   true

B.   false

26: If your application uses the camera on an Android powered device, the following line should be in your manifest file:

A.   <uses-feature android:name="" />

B.   <uses-feature="" />

C.   <uses-feature name="camera" />

27: What is the proper order of life cycle methods called when an Activity is first run?

A.   onStart(), onResume, onCreate()

B.   onCreate(), onRestart(), onResume()

C.   onCreate(), onResume(), onStart()

D.   onCreate(), onStart(), onResume()

E.   onStart(), onCreate(), onResume()

28: In which resource folder do we create an animation file ?

A.   drawable

B.   raw

C.   anim

D.   animation

E.   values

29: In order to be notified of a device switching from landscape to portrait view, you should:

A.   Both of these

B.   Override the onConfigurationChanged event

C.   Request changes via the android:configChanges="orientation" attribute for activities in your manifest file

30: True or False: The Android operating system is a multi-user Linux system in which each application is a different user.

A.   False

B.   True

31: How do you disable the scrollbars for a webview?

A.   all of these

B.   <WebView android:layout_height="wrap_content" />

C.   <WebView android:scrollbars="none" />

D.   <WebView android:layout_width="wrap_content" />

32: Is it possible to include code written in C?

A.   Yes

B.   No

33: What permission does your application need to use the network?

A.   android.permission.INTERNET

B.   android.permission.NETWORK


D.   The network features do not require a permission


34: What is the name of the main thread in Android

A.   Working Thread

B.   Main Thread

C.   UI thread

35: Which tag is used to add "Star Rating" in XML layout file?

A.   Stars

B.   RatingWidget

C.   RatingBar

D.   Rating

36: Which layout is deprecated since version 2.3?

A.   Frame Layout

B.   Absolute Layout

C.   Table Layout

D.   Relative Layout

37: Every Android application runs in its own process...

A.   within a shared system wide instance of the Dalvik Virtual Machine.

B.   with its own instance of the Dalvik Virtual Machine.

C.   with its own instance of the Java Virtual Machine.

38: What causes an Activity's onDestroy() method to be called.

A.   The Activity called finish().

B.   The Activity is paused or stopped and it's resources were needed by the operating system.

C.   All of these reasons.

D.   The Activity that launched this Activity called finishActivity()

39: What is the name of the new design guidelines given by Google ?

A.   Holo

B.   Classic

C.   Flat Design

D.   Material Design

40: Relative layout has two types of orientations: vertical and horizontal.

A.   True

B.   False

41: What are some examples of direct descendants of the android.view object?

A.   ProgressBar

B.   ViewGroup

C.   Neither of these

D.   Both of these

42: What AIDL is?

A.   Android InterProcess Definition Language

B.   Android Interface Definition Language

C.   Android InterProcess Dynamic Language

D.   Android Interface Dynamic Language

43: Who is known as the 'Father' of Android?

A.   Hugo Barra

B.   Sandar Pichai

C.   Sergey Brin

D.   Andy Rubin

E.   Larry Page

44: Which of these is NOT a Layout derived from the ViewGroup class?

A.   RelativeLayout

B.   AbsoluteLayout

C.   LinearLayout

D.   ListViewLayout

45: How do you get an intent data inside a fragment basically?

A.   Bundle args = getExtras().getActivity();

B.   Bundle args = new Bundle(getActivity().getIntent().getExtras());

C.   Bundle args = getActivity().getIntent().getExtras();

D.   Bundle args = getIntent().getActivity.getExtras();

E.   Bundle args = getActivity().getExtras().getIntent();

46: How can you assign a custom (NOT BUILT IN ANDROID) font typeface to a TextView?

A.   In code: mTextViem.setTypeface(Typeface myfont);

B.   In styles xml: <item name="android:typeface|>"myfont"</item>

C.   In layout xml: android:typeface="myfont"

47: Which of these ListAdapter subclasses is not a direct subclass of BaseAdapter?

A.   SimpleAdapter

B.   CursorAdapter

C.   ArrayAdapter

D.   HeaderViewListAdapter

48: True or false? Fragments are independent from Activities.

A.   True

B.   False

49: Android applications can "borrow" functionality from other applications by using...

A.   intent objects

B.   content Provider system

C.   application lifecyle methods

50: If the UI begins to behave sluggishly or crash while making network calls this is likely due to ....

A.   Hardware malfunction

B.   Activity Manager contains too much

C.   Virus on the server

D.   Network Latency