开发者

Android: Trouble declaring intent to be fired from a pendingIntent in a notification; done in a broadcastReceiver

开发者 https://www.devze.com 2023-01-03 22:11 出处:网络
I would 开发者_JAVA百科like to send a notification in a broadcast receiver. the notification should launch the default sms app.

I would 开发者_JAVA百科like to send a notification in a broadcast receiver. the notification should launch the default sms app.

Ultimately I want to create my own notifications for incoming text messages consistent with what the deault app, Handcent, and Chomp do.

I have the code to detect the threadId of the incoming sms.

How can I craft the intent to attach to the pendingIntent of the notification?

The following shows how to launch the sms app opening a particular thread, but the Intent creates a null pointer when I initialize it. Is it because it is being initialized in a broadcastReceiver, and not an activity?

How to open up a specific SMS in android

0

精彩评论

暂无评论...
验证码 换一张
取 消