SMS missing from content provider results on Android Marshmallow
Asked Answered
S

1

5

Some text messages are missing and never show in the content://sms provider URI since the Samsung S7 came out. I have noticed this between multiple Samsung devices (S6 and/or S7) that are on the same carrier (in this case T-Mobile) but may not be limited to. These text messages are showing in the default stock messaging app, but I cannot find how to access them. Keep in mind that I receive 97% of text messages just fine through that content provider, but that last 3% eludes me.

Uri uri = Uri.parse("content://sms/");
String[] projection_sms = { "*" };
Cursor cursor = getContentResolver().query(uri, projection_sms, "", null, null);

I have also looked within the SIM card to see if the missing SMS may be there and found nothing:

Uri uri = Uri.parse("content://sms/icc");

I have gone through all MMS as well to find that they are not in there either.

<uses-permission android:name="android.permission.READ_SMS" />

I only want to read SMS in this case and according to the Android docs you would only need the above permission to read from the SMS/MMS db. I realize that in KitKat there was a change which allowed an app to replace the default stock app, but in this particular case I only want to read SMS.

So if those SMS are not in the correct places in the db and are not in the SIM card, then where on Earth (or should I say in Android) would they be?

Strengthen answered 27/6, 2016 at 0:28 Comment(10)
Which messages are missing? Your non-default app will only get sent and inbox messages, so if it's draft, failed, etc. that you're not getting, that would be why.Gynous
The text messages that are missing are received messages, should be in the inbox and also available in content://sms/. These messages are showing in the default app as received, but I am not able to access those from anywhere.Strengthen
Do they share any other characteristic? Like, are they all really old? Or is it just random? Also, are you sure those messages were sent with SMS, and not something like RCS? Some apps will seamlessly combine those when displaying messages, but RCS won't be stored in the SMS Provider. Apparently T-Mobile calls RCS Advanced Messaging, btw.Gynous
Hmmm, wow, I think you are absolutely right. I did not even know about RCS. Thank you very much! Does Google allow access to RCS messaging? Or is it proprietary for the individual carrier?Strengthen
Yeah, that's gonna vary by carrier, atm. There's no standard API for RCS yet, AFAIK, though it might end up in the SDK eventually (if it's not in N already; dunno, I'm a little behind the cutting edge), since last I heard, Google was pushing for it to replace SMS.Gynous
Ouch, that is going to be a problem until then. I will have to look into N to see if it is an option. It looks like back in September Google purchased or have gone into bed with Jibe Mobile. Yes, it definitely looks like they are trying to implement it in some form or fashion. Just not sure how yet. jibe.google.com/jibe-platformStrengthen
Thank you so very much for your help. Very much appreciated!Strengthen
No problem. Glad to help. I should probably stick this in an answer, since this is sure to come up again as RCS becomes more commonplace. I'll put something together after I do a little more research to see where Google's at, as far as adopting this. Cheers!Gynous
Yes, definitely put it up as an answer. It seems that T-Mobile is boasting 40 Million users of their Advanced Messaging service.Strengthen
I'm faced this problem with sent message. Sometimes I sent a message with default app but cannot get sms in content://sms/. Any solutions for me?Linnlinnaeus
G
2

It seems the messages that are missing are in fact not SMS, but RCS messages. These are not stored in the SMS Provider, and therefore will not be returned from any queries to it, though messaging apps on devices that support RCS are likely to display them all together seamlessly. This would explain why it appears that your query results are incomplete.

RCS (Rich Communication Services) is basically enhanced SMS/MMS, offering functionalities such as real-time one-to-one and group chat, video calling, content sharing, etc., in addition to regular ol' text messaging. Currently, there is no standard API in Android for this, though Google is reportedly in the process of adopting this as an eventual replacement for SMS/MMS. I could find no official word on how this will be integrated or deployed, however.

Not every carrier offers RCS, and those that do have dedicated, proprietary apps and APIs to handle it. These, of course, are going to be different for each carrier/manufacturer, and even the branding varies widely. Most call it joyn, whereas T-Mobile brands it as Advanced Messaging. As RCS becomes more commonplace, it should become more standardized, but supporting RCS in your app currently will require specialized components and setups.

Gynous answered 27/6, 2016 at 4:50 Comment(1)
This recent answer indicates that they're able to pull RCS data through the MMS Provider, and this older one backs that up. I've not had a chance to confirm this, and I don't really do much with messaging anymore, but I thought I should mention it here.Gynous

© 2022 - 2024 — McMap. All rights reserved.