As in documentation, PendingIntent.getBroadcast()
is used to retrieve a PendingIntent
that will perform a broadcast, like calling Context.sendBroadcast()
.
You need to call PendingIntent.getService()
instead, which will start IntentService
:
PendingIntent pending = PendingIntent.getService(this, 0, alarmIntent, 0);