使用服务管理意图
Managing intents with a Service
我正在编写一个简单的通知调度程序。在触发通知时向服务发送 PendingIntents 的 AlarmManager。 Service 在收到来自 AlarmManager 的 Intent 时调用的方法是什么?
您应该为此使用 IntentService
,此方法将在服务上调用:
@Override
protected void onHandleIntent(Intent intent)
我正在编写一个简单的通知调度程序。在触发通知时向服务发送 PendingIntents 的 AlarmManager。 Service 在收到来自 AlarmManager 的 Intent 时调用的方法是什么?
您应该为此使用 IntentService
,此方法将在服务上调用:
@Override
protected void onHandleIntent(Intent intent)