Search code examples
androidservicenotificationsbroadcastreceiveralarmmanager

Managing intents with a Service


I am writing a simple notification scheduler. An AlarmManager in sending PendingIntents to the Service when it's time to fire the Notification. What is the method that's called by the Service when it receives the Intent from the AlarmManager?


Solution

  • You should be using an IntentService for this, and this method will get called on the service:

    @Override
    protected void onHandleIntent(Intent intent)