5

My application basically backup the SMS and MMS to cloud server. I used below URI to retrieve data from database.

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


MMS-Uri uri = Uri.parse("content://mms/");

Few days back while testing my app i noticed some messages(SMS & MMS) are missing while retrieving from SQLite. After doing some research i found that those are RCS (Rich Communication Services) messages. Now my challenge is to read RCS messages(SMS & MMS). Is there any way to read RCS (Rich Communication Services) messages in Android? What URI i need to use for read RCS (Rich Communication Services) messages?

Thanks in advance.

Yaseen Ahmad
  • 1,789
  • 5
  • 22
  • 42
Krish Allamraju
  • 693
  • 1
  • 7
  • 29
  • There is no standard API for RCS in Android yet. It's going to be different for each manufacturer/carrier. – Mike M. Aug 03 '16 at 18:25
  • Hi Mike, thanks for your reply. Manufacturer means mobile manufacturer? If i want to collect RCS messages(SMS & MMS) in samsung devices then placing " " permission is enough? – syam vakkalanka Aug 04 '16 at 05:42
  • @syam "Manufacturer means mobile manufacturer?" - Yep. "If i want to collect RCS messages(SMS & MMS)..." - RCS is not SMS or MMS. It's just RCS. "...in samsung devices then placing " " permission is enough?" - For Samsungs, yes, I believe that is the correct permission, but I've no idea what the API to actually retrieve the messages is like. If they use a `ContentProvider` (which is probable) then you would run a query on a `ContentResolver`, similar to what you do for SMS, though you'd have to figure out the authority. – Mike M. Aug 04 '16 at 08:25
  • @syam You could use one of the methods shown in [this post](http://stackoverflow.com/q/2001590) to confirm that the Provider exists, and get its authority if it does, and go from there. – Mike M. Aug 04 '16 at 08:25

1 Answers1

2

EDIT: It seems like the API won’t make it after all. Work is still happening to it apparently: https://android-review.googlesource.com/q/RCS+(status:open+OR+status:merged). But it won’t be for third-party developers.


According to this (https://9to5google.com/2019/02/22/android-q-rcs-api-delay/), now there will be no developer-accessible API for RCS messages until Android R at the earliest.


There isn’t a way (short of some vendor-specific API) at the moment, but support for programatically interfacing with RCS is underway if the code commits are any indication of the direction Android is going… https://android-review.googlesource.com/c/platform/frameworks/base/+/849669

The relevant classes are still being implemented, but it looks like you’ll be relying on these (tentatively):

  • RcsParticipant
  • RcsThread
  • Rcs1To1Thread (extends RcsThread)
  • RcsGroupThread (extends RcsThread)
  • RcsMessage
  • RcsIncomingMessage (extends RcsMessage)
  • RcsOutgoingMessage (extends RcsMessage)
  • RcsPart
  • RcsFileTransferPart (extends RcsPart)
  • RcsLocationPart (extends RcsPart)
  • RcsMultiMediaPart (extends RcsPart)
  • RcsTextPart (extends RcsPart)

This code is telling:

class RcsThreadQueryHelper {
    static final String ASCENDING = "ASCENDING";
    static final String DESCENDING = "DESCENDING";
    static final String THREAD_ID = "_id";
    static final Uri THREADS_URI = Uri.parse("content://rcs/thread");
    static final Uri PARTICIPANTS_URI = Uri.parse("content://rcs/participant");
    static final String[] THREAD_PROJECTION = new String[]{THREAD_ID};
    static String buildWhereClause(RcsThreadQueryParameters queryParameters) {
        // TODO - implement
        return null;
    }
}
Kevin Li
  • 291
  • 2
  • 12