Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why work-manager not use JobScheduler for 21 API

I read about work-manager and its documentation says that it uses JobScheduler on devices with API 23+ and Uses a combination of BroadcastReceiver + AlarmManager on devices with API 14-22 while JobScheduler is available from 21 API. So why its not using the JobScheduler from 21 API.

like image 651
Shubham Singhal Avatar asked Sep 15 '25 05:09

Shubham Singhal


1 Answers

As per this WorkManager issue:

We only use JobScheduler starting at API 23, because of bugs in JobScheduler in API 21 & 22.

As JobScheduler is a framework API, fixes are not able to be backported to previous versions of Android, leaving older versions, in this case API 21 and 22 devices, with a JobScheduler version that is unsuitable to build upon.

like image 113
ianhanniballake Avatar answered Sep 17 '25 20:09

ianhanniballake