I'm currently querying the Android sms/mms
database to retrieve all MMS
messages received and sent. Everything works fine, but I noticed that the column m_size only has a value for MMS
messages that were sent (not received).
Here's the query:
final String[] projection = new String[]{ "*" };
Uri uri = Uri.parse("content://mms");
Cursor query = _activity.getContentResolver().query(uri, projection, null, null, null);
using this, I am able to retrieve the total bytes of the message, but it is currently returning null
for MMS messages that were received.
if (query.moveToFirst())
{
do
{
// ...
Integer size = query.getInt(query.getColumnIndex("m_size"));
}
while (query.moveToNext());
}
Without having to calculate the "data"
column size of the message, is there anything wrong with my query/any reason why m_size
will return null
for MMS
messages that were received (and have a valid image attachment)?
Note: Not sure if anything has changed in earlier APIs, since this API is un-documented. I am currently testing/developing on a Nexus 5X using API 23.