Android 5.0 JobScheduler API on earlier versions?

前端 未结 6 1766
轻奢々
轻奢々 2021-02-01 02:40

I\'m building an Android application, which makes use of a manifest broadcast receiver to know when the device is plugged in. I think Android 5.0 JobScheduler API would be a mu

6条回答
  •  天命终不由人
    2021-02-01 03:20

    Important Update

    For Now onward everybody should use WorkManager for deferrable background tasks.

    • This library is backward compatible
    • It use JobScheduler,FirebaseJobDispatcher or AlarmManager
    • No Need to depend on play service library.
    • Recommended by Google for deferrable background work.
    • Can use features like chaining, constraints etc.

    https://developer.android.com/guide/background/#workmanager https://developer.android.com/topic/libraries/architecture/workmanager/

提交回复
热议问题