Android Programming and Technical Programming Technical

What is the difference between broadcast receiver and a service?

Options
1) BroadReceiver - is like gateway for other components, can do small back ground functionality with in 10 seconds. Services - can do long running operation in the background with out having UI, and no time limit for it.
2) Service - is like gateway for other components, can do small background functionality with in 10 seconds. BroadcastReceiver - can do long running operation in the background with out having UI, and no time limit for it.
3) Option 1 is right, but both receiver and service both can interact with UI if they want to. Broadcast Receivers have time limit of 10 seconds, and they respond to broadcasted messages.
4) Option 1 is right, but a service can interact with UI if it wants. Its not mandatory that service should not have UI.

Read Solution (Total 1)

Android Other Question

Broadcast receiver runs in which thread by default?

Options
1) Main Thread
2) background thread
3) no thread
4) none of these
What is the time limit of a broadcast receiver, what will happen if it crosses that time limit?

Options
1) 2 sec
2) 5 sec
3) 10 sec
4) 15 sec