Книги автора: Beginning Android
Книга: Beginning Android
IntentService
IntentService
A common pattern, particularly when using AlarmManager
for scheduling periodic background work, is to have a service that implements onStart()
and forks a background thread to do the desired work. This runs the risk of forking too many threads, though, and managing your own work queue and thread pool can be annoying.
The IntentService
class wraps that pattern up for you. All you do is implement onHandleIntent()
, and Android will process all inbound Intents via a work queue on a background thread. Android will also automatically stop the service when the work queue becomes empty, to help minimize the memory footprint of your application.
Оглавление статьи/книги
Похожие страницы
- Тест 9
- Общественное мнение и этические вопросы в прямом маркетинге
- 8.3 Writing HTML
- Концепция «Путь Samsung» как основа конкурентоспособности корпорации
- Когда использовать невидимый Интернет
- Вычислимость в классической физике: где мы находимся?
- Создание содержимого уровня блока:
- Глава 18. Извлекайте уроки из всех своих разработок
- Управление значениями