Android quiz questions

Android interview questions

  • 1.

    Which of these is the incorrect explanation of the Android SDK and AVD Manager?

    1. The "android" command can be used if "<SDK install folder>/tools" is added to the command path.

    2. The development tools that can be downloaded from Android SDK and AVD Manager are SDK Android platform, NDK-platform, emulator images, and USB
      drivers for handsets.

    3. You can create and startup AVD, and on startup you can delete user data up to that point.

    4. They are provided from version 1.6 of the SDK. Up to Version 1.5, there was an AVD Manager but it lacked SDK management functions.

  • 2.

    Which is not included in the Android application framework?

    1. NotificationManager

    2. DialerManager

    3. PackageManager

    4. WindowManager

  • 3.

    Which of these is NOT recommended in the Android Developer's Guide as a method of creating an individual View?

    1. Create by extending already existing View classes such as Button or TextView.

    2. Create by extending the android.view.View class.

    3. Create by combining multiple Views.

    4. Create by copying the source of an already existing View class such as Button or TextView

  • 4.

    Which of the following is a call-back method that inflates an options menu from file res/menu/menu.xml?

    1. onCreateOptionsMenu

    2. onCreate

    3. onOptionsItemSelected

    4. onCreateMenu

  • 5.

    What does the following code achieve?

    Intent intent = new Intent(FirstActivity.this, SecondActivity.class);


    1. Starts an activity service

    2. Starts a sub-activity

    3. Starts a browser activity

    4. Sends results to another activity

  • 6.

    Which of the following is a correct Android Manifest statement?

    1. <uses-permission android:name="android.Internet"></uses-permission>

    2. <uses-permission android:name="android.permission.Internet”/>

    3. <uses-permission android:name="android.Internet"/>

    4. <uses-permission android:name="android.permission.Internet">

  • 7.

    Which of the following WebView methods allows you to manually load custom HTML markup?

    1. loadData

    2. loadCustomData

    3. loadHTML

    4. loadCustomHTML

  • 8.

    If your application is throwing exception android.content.ActivityNotFoundException, how to fix it?

    1. Create a new activity Java sub-class.

    2. Add the activity to the AndroidManifest

    3. Rename your activity

    4. Create the activity layout

  • 9.

    Which configuration file holds the permission to use the internet?

    1. Java source file

    2. Layout file

    3. Manifest file

    4. Property file

  • 10.

    Which of the following is true about object arrayAdapter declared in the code below?

    String[] items = {"Item 1","Item 2","Item 3");
    ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);


    1. It creates four views for listView.

    2. It creates Buttons for each String in array items.

    3. It replaces the layout of the activity with three consecutive TextView items.

    4. It creates a TextView for each String in array items.

  • 11.

    Which of the following lines of code is used to pass a value to the next activity?

    1. Intent i = new intent(this,newActivity);


    2. Intent i = new intent(this,newActivity);


    3. Intent i = new intent(this,newActivity);


    4. Intent i = new intent(this,newActivity);


  • 12.

    Which file specifies the minimum required Android SDK version your application supports?


    2. AndroidManifest.xml

    3. strings.xml

    4. main.xml

  • 13.

    Which of the following information is not included in the Manifest file?

    1. The application's minimum SDK version required.

    2. The handset model compatible with your application.

    3. The permissions required by the application.

    4. The activities contained in the application.

  • 14.

    Consider the following code snippet:

    String[] result columns = new String[] {KEY ID, COL1, COL2};
    Cursor allRows = myDatabase.query(true, DATABASE_TABLE, result_columns, null, null, null, null, null, null);

    Which of the following prints out the values of COL1 column correctly if the result is not empty?

    1. if (cursor.moveToFirst()) {
      	} while (cursor.moveToNext());


    2. if (cursor != null) {
      	do {
      	} while (cursor.isNull());


    3. if (cursor != null) {
      	do {
      	} while (cursor.isNull());


    4. if (cursor.moveToFirst()) {
      	do {
      	} while (cursor.moveToNext());


    5. do {
      } while (cursor.moveToNext());


  • 15.

    What does the Android project folder "res/' contain?

    1. Java source code

    2. Resource files

    3. Jawa Activity classes

    4. Libraries

  • 16.

    Consider the following code:

    Intent intent = new Intent();

    Which of the following is correct about the code above?

    1. It will not compile without adding the INTERNET permission the Manifest file.

    2. It starts any activity in the application that has a WebView in its layout.

    3. It sends a result to a new Activity in a Bundle.

    4. When it is executed, the system starts an intent resolution process to start the right Activity.

  • 17.

    To add a new Activity to your application, you need to perform the following steps:

    1. Create layout resource only.

    2. Create a Java class that extends View, set a layout, and add an Activity tag in AndroidManifest.xml

    3. Add an Activity tag to AndroidManifest.xml, and add ACTIVITY permission

    4. Create a Java class that extends Activity, add an Activity tag in AndroidManifest.xml, and Create a layout for the activity.

  • 18.

    What does the following line of code achieve?

    Intent intent = new intent(FirstActivity.this, SecondActivity.class);


    1. Create an explicit intent

    2. Creates an implicit intent

    3. Create a visible intent

    4. Creates a hidden intent

  • 19.

    What is the name of the class used by Intent to store additional information?

    1. Bundle

    2. DataStore

    3. Extra

    4. Parcelable

  • 20.

    Which of following is a callback method that inflates and options menu from file res/menu/menu.xml?

    1. onCreate

    2. onCreateMenu

    3. onCreateOptionsMenu

    4. onOptionsItemSelected


© 2017