Alien head

Android

Description: Android
Number of Questions: 15
Created by:
Tags: Android Introduction to Android
Attempted 0/15 Correct 0 Score 0

.apk file is present in _______ directory of project.

  1. bin

  2. res

  3. gen

  4. src


Correct Option: A
Explanation:

 It is present in bin directory of project.

Which of the following methods is not provided by AsyncTask?

  1. doInBackground()

  2. doInFront()

  3. onPreExecute()

  4. onPostExecute()


Correct Option: B
Explanation:

Following are the methods provided by AsyncTask:
doInBackground(), onPreExecute(),onPostExecute(), onProgressUpdate(), isCancelled(). There is no method called doInFront() provided by AsyncTask.

What is the use of toast?

  1. For background task

  2. To provide a text window

  3. To provide a simple popup

  4. None of these


Correct Option: C
Explanation:

A toast provides a simple popup.

Where should the images be stored in an android project?

  1. Layout

  2. Values

  3. Drawable

  4. Assest


Correct Option: C
Explanation:

Images to be used in android projects should be stored in drawable folder of res directory.

What is the use of AndroidManifest.xml present in res folder?

  1. To modify the application permissions

  2. To add media files(images)

  3. To change layout or graphical view

  4. To provide pointers to drawable, layout and values directory


Correct Option: A
Explanation:

AndroidManifest.xml present in res folder is used to modify the application permissions, activities and intent fillters.

__________ is a bundle of additional information, which can be used to provide extended information to the component.

  1. Log

  2. Extras

  3. Toast

  4. None of these


Correct Option: B
Explanation:

Extras is a bundle of additional information which can be used to provide extended information to the component. 

Which of the following options is not present in resource folder?

  1. Values

  2. Layout

  3. Drawable

  4. Assests


Correct Option: D
Explanation:

The res directory has subfolders - values, layout and drawable.

Which of the following options is not a sub folder of bin directory?

  1. Res

  2. Classes

  3. DexedLibs

  4. Libs


Correct Option: D
Explanation:

The bin directory has res, classes and dexedLibs.

Which package needs to be imported for displaying images?

  1. android.widget.ImageView

  2. android.widget.Image

  3. android.widget.ShowImage

  4. None of these


Correct Option: A
Explanation:

The android.widget.ImageView package has to be imported for displaying images. 

Which of the following options is not a method from the android activity life cycle?

  1. onDestroy

  2. onPause

  3. onRewind

  4. onResume


Correct Option: C
Explanation:

.

Which field(s) from manifest.xml has/have to be edited if we want to use camera in our project?

  1. Only uses-permission

  2. Only uses-feature

  3. Both uses-permission and uses-feature

  4. None of these


Correct Option: C
Explanation:

Manifest.xml file should contain the following code:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.CAMERA" />

The file ________ is an auto-generated file that is added to your application by the android plugin.

  1. BuildConfig.java

  2. AndroidManifest.xml

  3. <activity>.java

  4. R.java


Correct Option: D
Explanation:

The file R.java is an auto-generated file that is added to your application by the android plugin.

_______ is an object used for runtime binding.

  1. Bundle

  2. Intent

  3. Message

  4. Log


Correct Option: B
Explanation:

Intent is an object used for runtime binding.

Which of the following options is/are correct about android?
Designing user interface is
(a) XML-based
(b) Code-based

  1. Only a

  2. Only b

  3. Both a and b

  4. None of these


Correct Option: C
Explanation:

.

_______ defines a particular device’s software version and hardware format to run user designed application in.

  1. Run as

  2. Android virtual devices (or AVD for short)

  3. Emulator

  4. Hardware (mobile phone having android OS)


Correct Option: B
Explanation:

Android virtual devices (or AVD for short) defines a particular device’s software version and hardware format to run user designed application in. 

+ View questions