Hey I found the URIs in the source code of MMSprovider.java... the
URIs supported are below.  But first, here is how you use them to get
the address/phone numbers...
First, look up the ID of the MMS you're interested in, using whatever
criteria, such as query(Uri.parse("content://mms"), new String[]
{"max(_id)"}, null,null,null....)
Once you have the _id you're interested in, query(Uri.parse("content://
mms/"+id+"/addr"),null,null,....)
This will return a cursor with an entry for every number sent to (or
others in the CC list if it was a received MMS). The "address" column
is the number.  The type column is "151" for a recipient, "137" for a
sender.
To find other useful information about the SMS, such as the actual
content, this is stored in the "part" table, accessible here:
query(Uri.parse("content://mms/"+id+"/part"),null,null,....)
To retrieve the attached info, look for any entry in that part table
whose "_data" field is not null, and that is the filename of the
attachment without an extension. To determine the extension, use the
mime type stored in the "ct" column.

Note also that this interface is NOT SUPPORTED.  That is, it's not in
the documentation which means Google is free to change it at any time
without warning.  If you're OK with that risk, here is the list of
supported URIs.  They actually come from an older file (about a year
old), so some may already be deprecated, but most of it seems to still
work in version 2.1.

sURLMatcher.addURI("mms", null,         MMS_ALL);
sURLMatcher.addURI("mms", "#",          MMS_ALL_ID);
sURLMatcher.addURI("mms", "inbox",      MMS_INBOX);
sURLMatcher.addURI("mms", "inbox/#",    MMS_INBOX_ID);
sURLMatcher.addURI("mms", "sent",       MMS_SENT);
sURLMatcher.addURI("mms", "sent/#",     MMS_SENT_ID);
sURLMatcher.addURI("mms", "drafts",     MMS_DRAFTS);
sURLMatcher.addURI("mms", "drafts/#",   MMS_DRAFTS_ID);
sURLMatcher.addURI("mms", "outbox",     MMS_OUTBOX);
sURLMatcher.addURI("mms", "outbox/#",   MMS_OUTBOX_ID);
sURLMatcher.addURI("mms", "part",       MMS_ALL_PART);
sURLMatcher.addURI("mms", "#/part",     MMS_MSG_PART);
sURLMatcher.addURI("mms", "part/#",     MMS_PART_ID);
sURLMatcher.addURI("mms", "#/addr",     MMS_MSG_ADDR);
sURLMatcher.addURI("mms", "rate",       MMS_SENDING_RATE);
sURLMatcher.addURI("mms", "report-status/#",  MMS_REPORT_STATUS);
sURLMatcher.addURI("mms", "report-request/#", MMS_REPORT_REQUEST);
sURLMatcher.addURI("mms", "drm",        MMS_DRM_STORAGE);
sURLMatcher.addURI("mms", "drm/#",      MMS_DRM_STORAGE_ID);


On Mar 17, 9:22 am, Chitra MCA <[email protected]> wrote:
> HI,,,,
>
>           Using content provider("content://mms/" ,,,, "content://mms/
> part") i am getting MMS details.i.e., Subject, Txt Message,
> Attachment. These details are getting from SQLite database. Same like
> how can getting mms sender,receiver phone number. In SQLite DB, we
> have "addr" table. its containing sender, receiver phone number. But
> whenever i try to access this table("content://mms/addr"), the cursor
> value is null. How can getting mms sender/Receiver phone number???
>
> Thanks,
> Chitra

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to