Android Choose the following questions:

Android Choose the following questions:

1) If the service runs in the same process as the client, we should bind to the service using :

a) Aidl
b) Binder class
c) Messenger
d) Handler

Answer : b) Binder Class

2) When a service is bound using the bindService, which of the following method is not called :

a) onBind()
b) onStart()
c) onStartCommand()
d) onCreate()

Answer : c) onStartCommand()

3) Service runs in the main thread of hosting process :

a) True
b) False

Answer : a) True

4) IntentService is stopped by calling stopSelf or stopService :

a) True
b) False

Answer : a) False


5) Process which hosts a Service that's bound to the activity that the user is interacting with is :

a) Visible Process
b) Foreground Process
c) Service Process
d) Background Process

Answer : b) Foreground Process

6) In an explicit intent, the sender specifies the type of receiver:

a) True
b) False

Answer : b) False

7) When an activity doesn't exist in memory it is in :

a) Starting state
b) Running state
C) Loading state
d) Inexistent state

Answer : a) Starting State

8) In an implicit intent is the sender specifies the type of receiver?

a) True
b) False

Answer : b) False

9) Application contexts are independent of the activity life cycle :

a)True
b) False

Answer : a) True

10) Which of the following is NOT a state in the lifecycle of a service?

a) Starting
b) Running
c) Destroyed
d) Paused

Answer : d) Paused

11) How is a simulator different from an emulator?

a) Emulators are only used to play old SNES games, simulators are used for software development
b) The emulator is shipped with the Android SDK and third party simulators are not
c) The emulator can virtualize sensors and other hardware features, while the simulator cannot
d) The emulator imitates the machine executing the binary code, rather than simulating the behavior of the code at a higher level.

Answer : D) The emulator imitates the machine executing the binary code, rather than simulating the behavior of the code at a higher level.

12) Default launch mode of an activity is :

a) singleTop
b) standard
c) singleTask
d) singleInstance

Answer : b) standard

13) If the user leaves a task for long time :

a) System clears root activity and retain state of all other activities.
b) System will clear task of activities except root activity.
c) System will retain the tasks state until closed explicitly.
d) System is independent of activities.

Answer : b) System will clear task of activities except root activity.

14) Android doesn't support which format :

a) MP4
b) MPEG
c) AVI
d) MIDI

Answer : c) AVI

15)The plus(+) means in statement android:id="@+id/my_id" ?

a) identify it as an id resource
b) Create new id and add to resources
c) Xml parser should parse and expand id string
4) Both a & b

Answer : b) Create new id and add to resources










Comments

Post a Comment

Please post comments here:-)

Popular posts from this blog

Android Objective type Question and Answers

Android Questions and Answers for written exams

Core Java -----Question and Answers