Android For Beginners
Other,
Updated On 02 Feb, 19
Other,
Updated On 02 Feb, 19
4.1 ( 11 )
Join us at and Take a FREE Webinar httpwww.edureka.coandroid-development-certification-course
This android tutorial talks about Services in detail
Read more about services at
httpwww.edureka.coblogandroid-tutorials-beginners-service-component
What are Services in Android System?
-------------------------------------------------------
1) Faceless components The components of Android system that run in the background are Service components. They are very much like activities, only without a User Interface.
2) Taking care of long running background tasks They carry out long-running tasks desired by the application (without user intervention). Services run the background tasks that do not require a User Interface.
3) Unaffected by activity switching Each Service has a specific job, and they keep at it if you switch between different Activities, or even if you switch to a different application altogether.
4) It can also provide functionality to other applications.
5) Example of Service A good example is your music player.
When you play music in your Android handset using a playlist, the music player takes care of the job itself, without user intervention. You do not have to change the song every time one song ends. This automation is due to the service component of Android.
User can switch from this application to another without stopping the service.
e.g. Music Player, Network Download
Forms of Services
----------------------------
A Service can have two forms
1) StartedUnbound In this case, an application component starts the service, and it would continue to run in the background, even if the original component that initiated it is destroyed. For instance, when started, a service would continue to play music in the background indefinitely.
2) Bound An Android component may bind itself to a Service using bindservice (). A bound service would run as long as the other application components are bound to it. As soon as they unbind, the service destroys itself.
An unbound activity runs indefinitely, whereas the lifespan of a bound activity depends on the application components that bind to it.
Know more about Services -
httpwww.edureka.coblogandroid-tutorials-beginners-service-component
---------------------------------------------------------
Please write back to us at support@edureka.in or call us at +91-8880862004 for more information.
httpwww.edureka.co
Use the link to watch all videos of this session
httpwww.youtube.complaylist?list=PL9ooVrP1hQOHiWL2R-gYcF8oA4yPJKTNb
Sam
Sep 12, 2018
Excellent course helped me understand topic that i couldn't while attendinfg my college.
Dembe
March 29, 2019
Great course. Thank you very much.