Questions
View.post(runnable) is a
- worker thread
- UI thread
- service call
- foreground process
onPostExecute(…) method of AsyncTask is
- work on worker thread
- work on UI thread
- work on background thread
- work on foreground thread
The value returned by doInBackground() of AsyncTask is sent to
- android OS
- calling component
- onPostExecute(…) method of AsyncTask
- onProgressUpdate() method of AsyncTask
Which of the following processes is called ‘Visible Process’ in android?
- A dialog shown on an activity in background
- The activity on which a dialog is shown
- A button on the dialog
- All of the above
Which of the following processes is called ‘Foreground Process’ in android?
- A dialog shown on an activity in background
- The activity on which a dialog shown
- A button on the dialog
- All of the above
Runnable is a/an
- class used to implement multithreading
- process used to implement multithreading
- interface used to implement multithreading
- None of these
_______ method of thread class creates a background process.
- Start()
- Thread(…)
- Run()
- Both (1) and (3)
________ should be used to run a process after completion of background process.
- Handler class
- View.postDelayed(Runnable, long)
- onPostExecute(…) method of AsyncTask
- Both (1) and (3)
A service is a/an
- background process
- application component
- empty process
- None of these
onStartCommand() method of service gets called when
- service is started through activity
- service binds with any component
- Both (1) and (2)
- None of these
onCreate() method of Service gets called when
- service is started through activity
- service binds with any component
- Both (1) and (2)
- None of these
What is needed to run service?
- To add permission in manifest
- To register in manifest
- Both (1) and (2)
- Nothing is required
________ service keeps running in background, even if calling component gets destroyed.
- Service started using startService()
- Service created with bindService()
- Both (1) and (2)
- Service can’t run independently
Which of the following statements is true?
(a) Service can start independently.
(b) Another android component can start service.
- Both (a) and (b)
- Only (a)
- Only (b)
- None of these
What is needed to stop normal service?
- Calling component needs to call stop service.
- Service can self stop.
- Both (1) and (2) are correct.
- It will stop automatically if calling component is destroyed.