Service là component chạy nền không có tương tác người dùng, thích hợp cho các tác vụ chạy lâu như phát nhạc, tải file, hay theo dõi vị trí.
- Service không có UI nhưng chạy trên main thread mặc định, nên cần offload tác vụ nặng sang background thread hoặc coroutine.
- Foreground service hiển thị notification liên tục và dùng cho tác vụ nền ưu tiên cao.
A Service is a background component that runs without user interaction, perfect for long-running tasks like music playback, file downloads, or location tracking.
- Services don't have UI but run on the main thread by default, so long operations should be offloaded to background threads or coroutines.
- Foreground services show a persistent notification and are used for high-priority background tasks.