问题描述
我使用Commonsware的WakefulIntentService(从 AlarmReceiver
似乎找到并引发一个AlarmListener。我错了,或者是有另一种方式来安排报警或设置不同的PendingIntent?
基本上,我想可以注册一个新的,独立的 AlarmListener
,或者至少能够找出哪些 WakefulIntentService
送工作,在 sendWakefulWork(上下文)
方法。
You do not need to do that. A single WakefulIntentService
can do multiple things, based on different Intent
characteristics (e.g., action strings, extras). Having multiple WakefulIntentService
implementations in the same project is untested -- and unless somebody can convince me of its necessity, is unsupported.
No, you are correct.
Follow the "Basic Usage" instructions on the project's README.
Please only have one WakefulIntentService
.
Please only have one WakefulIntentService
.
这篇关于如何设置两个不同的WakefulIntentService AlarmListeners?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!