MENU

Fun & Interesting

Understanding and Using Services in Android: Background & Foreground Services

Codeible 80,724 lượt xem 3 years ago
Video Not Working? Fix It Now

If you find this video helpful, please Like, Share, and Subscribe to support the channel!

Download project: https://codeible.com/coursefiles/androidservice

View article on Codeible.com: https://codeible.com/view/videotutorial/LZWSPaG0pH8KZDGjat1M;title=Understanding%20and%20Using%20Services%20in%20Android:%20Background%20&%20Foreground%20Services

Hello, in this video, I will show you how to utilize Background and Foreground Services in Android.

There are 3 types of services in Android – Background, Foreground, and Bound. Each of these terms are misleading because it is not describing the behavior of how each service are used, but it is describing how they are terminated.

For Android Developers, a Service is a component that runs on the background to perform long-running tasks.

A Background Service is a service that runs only when the app is running so it’ll get terminated when the app is terminated.

A Foreground Service is a service that stays alive even when the app is terminated.

And a Bound Service is a service that runs only if the component it is bound to is still active.


0:00 - Start of video
0:12 - Background, Foreground, and Bound Services
0:50 - Creating and Demoing Background Services
3:42 - Creating and Demoing Foreground Services
11:12 - Restarting a Foreground Service on Device Reboot using BroadcastReceiver



Support Codeible on Patreon!
https://www.patreon.com/codeible

Reddit:
https://www.reddit.com/user/Codeible

Follow on Pinterest:
https://www.pinterest.com/codeible/

Follow on Instagram:
https://www.instagram.com/codeibleig/

Follow on Twitter:
https://twitter.com/intent/follow?original_referer=https%3A%2F%2Fcodeible.com%2F&ref_src=twsrc%5Etfw&screen_name=kingwaimark&tw_p=followbutton

Comment