Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 OnReceive() 方法中使用 SMSManager 发送消息,我想为 SMSManager 添加发送和传递报告意图,当我通过编程方式和清单在另一个接收器中注册接收器时,它不调用发送的短信接收器。
是否可以在 onReceive() 中执行或帮助我如何实现这一目标?
答案是IntentReceiver不允许组件注册以接收意图。您不能BroadcastReceiver在现有的BroadcastReceiver.
IntentReceiver
BroadcastReceiver