Getting unseen count for MMS messages in Android

917 Views Asked by At

I'm trying to get a count of unseen mms message which I've got a content observer triggering when the mms/inbox changes..

This is the cursor

Cursor cursor = localContentResolverMMS2.query(Uri.parse("content://mms/inbox"), null,
                NEW_INCOMING_MM_CONSTRAINT, null, null); 

and NEW_INCOMING_MM_CONSTRAINT is:

String NEW_INCOMING_MM_CONSTRAINT =
        "(" + Telephony.Mms.MESSAGE_BOX + "=" + TelephonyProviderConstants.Mms.MESSAGE_BOX_INBOX
                + " AND (" + TelephonyProviderConstants.Mms.MESSAGE_TYPE + "=" + 130 // MESSAGE_TYPE_NOTIFICATION_IND
                + " OR " + Telephony.Mms.MESSAGE_TYPE + "=" + 132 + "))";   //MESSAGE_TYPE_RETRIEVE_CONF

It fires fine when I get a new message, but when I try view the message in a messenger app such as google messenger or textra the "seen" status doesn't seem to change. I'd expect it to change to "1" (seen) from "0" (unseen).

Am I querying something wrongly?

0

There are 0 best solutions below