Mms Date Is Alwasy Wrong
Solution 1:
In the populateFromMmsPart()
method, you're querying for records in the part
table whose _id
matches the message ID from the mms
table. However, the _id
in the part
table is the ID for the part, not the message. The message ID is in the mid
column. This is apparently causing a mix-up when a message ID happens to match a part ID for an older message.
Change your query as follows.
Cursorc= contentResolver.query(messages, null, "mid=" + msgId, null, null);
Also, in the populateFromMmsPart()
method, you only handle the first row of the returned Cursor
. That Cursor
is going to have (at least) three rows. One will be application/smil
, one will be text/plain
, and the other one(s) will be the MIME type(s) for the attachment(s). You need to iterate over that Cursor
to get them all. As you have it now, you're just calling c.moveToFirst()
, and handling that one row.
Post a Comment for "Mms Date Is Alwasy Wrong"