Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

What is not a service?

What is not a service?



a. Intercept the events from a user's interaction with your application

b. Like an activity, it has lifecycle methods that you can implement to monitor changes in its state.

c. It is a program that can run in the background for an indefinite period

d. Service is another building block of android application it does not provide a UI


Answer: A

If the user leaves a task for long time

If the user leaves a task for long time



a. System clears an activity and retain state of all other activities

b. System is independent of activities

c. System will retain the tasks state until closed explicitly

d. System will clear task of activities except root activity


Answer: D

What is a Fragment?

What is a Fragment?



a. A fragment is a part or portion of an activity

b. All of these

c. A fragment is modular in a sense that you can move around or combine with other fragments in a single activity

d. Fragments are also reusable



Answer: B

What is broadcast receiver?

What is broadcast receiver?



a. Intercept the events from a user's interaction with your application

b. The interactive components in your app's user interface

c. Represents a behavior or a portion of user interface in an activity

d. A component that does thing but receive and react to broadcast announcements


Answer: D

What method is used to send a broadcast event?

What method is used to send a broadcast event?



a. sendBroadcast(intent);

b. startBroadcast(intent);

c. registerBroadcast(intent);

d. sendBroadcastReceiver(intent);


Answer: A