Can you use pending intents with localbroadcasts?

前端 未结 1 764
隐瞒了意图╮
隐瞒了意图╮ 2021-02-12 15:33

I am interested in using pending intents with local broadcasts. To make myself clear, I am using the following for registering receivers and sending broadcast: android.sup

相关标签:
1条回答
  • 2021-02-12 15:55

    I am interested in using pending intents with local broadcasts.

    That is not possible.

    The point behind a PendingIntent is to allow some other process to perform an action you request, such as sending a broadcast.

    The point behind LocalBroadcastManager is to keep broadcast within your process.

    Hence, a PendingIntent can issue a regular broadcast, but not one via LocalBroadcastManager.

    0 讨论(0)
提交回复
热议问题