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
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)