How to read RCS messages from android device programmatically [duplicate]
Asked Answered
N

1

7

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.

Nigel answered 3/8, 2016 at 6:46 Comment(0)
R
3

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;
    }
}
Revulsive answered 23/1, 2019 at 1:50 Comment(1)
Any news on this front? I am already able to receive RCS messages in my SMS app, but I don't know who to send RCS messages. Any clue / link to library or doc?Melanous

© 2022 - 2024 — McMap. All rights reserved.