开发者

How to generate an Intent that jumps into a specific short message conversation?

I would like to create an Intent that opens the messages application in a specific conversation.

If a short message notification is clicked Logcat reveals the following:

INFO/ActivityManager(31909): Starting activity: Intent { act=android.intent.action.VIEW dat=content://mms-sms/conversations/3 flg=0x34000000 cmp=com.android.mms/.ui.ConversationList 开发者_如何学运维bnds=[0,586][600,682] }

This brought me a little bit further using content://mms-sms/conversations/3 as the data starts up the messages app in the correct conversation. I now only need to find out which conversation a message belongs to.


I would suggest to explore Android sources, specifically look into SMS/MMS ContentProvider sources. In the end all we know that SMS/MMS stored somewhere in SQLite database and ContentProvider is just way accessing to SQL tables through forming specific Uri string. In your case Uri string is:

content://mms-sms/conversations/3 flg=0x34000000 cmp=com.android.mms/.ui.ConversationList bnds=[0,586][600,682]

So you need to understand how this string parsed into normal data query. I believe it can be found in Android sources.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜