Android 5.0 JobScheduler API on earlier versions?

前端 未结 6 1612
轻奢々
轻奢々 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 02:54

    Another option is this library: https://github.com/evernote/android-job

    It uses the JobScheduler and GcmNetworkManager if possible. Otherwise it fallbacks to the AlarmManager. It also handles different API levels with the AlarmManager properly. This blog post gives you an overview.

    (PS: I'm the main developer who worked on this library at Evernote. It's useful for our projects, that's why I wanted to share it here as well)

提交回复
热议问题