This is worked only in the device where google messaging is enabled :
RCS message basically is stored in Uri.parse("content://mms")
content providers.You can alternatively useTelephony.Mms.CONTENT_URI
.
You can read the RCS related message by passing the URI Uri.parse("content://mms")
in the contentResolver. Actually mms content type read the both mms and RCS message. Sample code is given here.
val cursor = contentResolver.query(
Uri.parse("content://mms"),
arrayOf("*"),
"thread_id = ?",
selectionArgs,
null
)