0
Alien head

Android Processes

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

View.post(runnable) is a

  1. worker thread

  2. UI thread

  3. service call

  4. foreground process


Correct Option: B

onPostExecute(…) method of AsyncTask is

  1. work on worker thread

  2. work on UI thread

  3. work on background thread

  4. work on foreground thread


Correct Option: B

The value returned by doInBackground() of AsyncTask is sent to

  1. android OS

  2. calling component

  3. onPostExecute(…) method of AsyncTask

  4. onProgressUpdate() method of AsyncTask


Correct Option: C

Which of the following processes is called ‘Visible Process’ in android?

  1. A dialog shown on an activity in background

  2. The activity on which a dialog is shown

  3. A button on the dialog

  4. All of the above


Correct Option: B

Which of the following processes is called ‘Foreground Process’ in android?

  1. A dialog shown on an activity in background

  2. The activity on which a dialog shown

  3. A button on the dialog

  4. All of the above


Correct Option: A

Runnable is a/an

  1. class used to implement multithreading

  2. process used to implement multithreading

  3. interface used to implement multithreading

  4. None of these


Correct Option: C

_______ method of thread class creates a background process.

  1. Start()

  2. Thread(…)

  3. Run()

  4. Both (1) and (3)


Correct Option: C

________ should be used to run a process after completion of background process.

  1. Handler class

  2. View.postDelayed(Runnable, long)

  3. onPostExecute(…) method of AsyncTask

  4. Both (1) and (3)


Correct Option: D

A service is a/an

  1. background process

  2. application component

  3. empty process

  4. None of these


Correct Option: B

onStartCommand() method of service gets called when

  1. service is started through activity

  2. service binds with any component

  3. Both (1) and (2)

  4. None of these


Correct Option: A

onCreate() method of Service gets called when

  1. service is started through activity

  2. service binds with any component

  3. Both (1) and (2)

  4. None of these


Correct Option: C

What is needed to run service?

  1. To add permission in manifest

  2. To register in manifest

  3. Both (1) and (2)

  4. Nothing is required


Correct Option: B

________ service keeps running in background, even if calling component gets destroyed.

  1. Service started using startService()

  2. Service created with bindService()

  3. Both (1) and (2)

  4. Service can’t run independently


Correct Option: A

Which of the following statements is true?

(a) Service can start independently. (b) Another android component can start service.

  1. Both (a) and (b)

  2. Only (a)

  3. Only (b)

  4. None of these


Correct Option: C

What is needed to stop normal service?

  1. Calling component needs to call stop service.

  2. Service can self stop.

  3. Both (1) and (2) are correct.

  4. It will stop automatically if calling component is destroyed.


Correct Option: C
+ View questions