Difference between Service and Broadcast receivers in android

Difference between Service and Broadcast receivers in android


Service is used when you want to do something in background, any long running process can be done using Service in Background. For example, you want to play music when your application gets close. In that case service will be running in background with music.


BroadcastReceiver is used when you want to fire some stuff or code during some event. For example, event can be on Boot of Device. If you want to perform something when device Boots, date and time changed etc...


Difference between Service and Broadcast receivers in android Difference between Service and Broadcast receivers in android Reviewed by Anonymous on November 14, 2017 Rating: 5

No comments:

Java Ternary Operator

Java Ternary Operator Java ternary operator is the only conditional operator that takes three operands. Java ternary operator is a one l...

Powered by Blogger.