Unable to read all sent and received messages using Telephony Content Provider. I am using Samsung A71 Device, I am using Telephony service to read all messages
Uri uriSMSURI = Uri.parse("content://sms");
Cursor cur = getContentResolver().query(uriSMSURI, null, null, null, null);
List<String> sms = new ArrayList<String>();
while (cur.moveToNext()) {
String address = cur.getString(cur.getColumnIndex("address"));
String body = cur.getString(cur.getColumnIndexOrThrow("body"));
sms.add("Number: " + address + " .Message: " + body);
}
But I can only get incoming messages I cannot get any outgoing messages with telephony service.
I have tried using the easy-content-providers library, it is also showing only incoming messages. https://github.com/EverythingMe/easy-content-providers
How can I get outgoing messages in Samsung A71? Can someone help me solving this issue?
Finally, I came to know that the Samsung A71 Default Messages app is not using android Message formats while storing the messages in the device, that is the reason I cannot able read sent messages on the A71 device.
How did I know this? I have installed Some other messaging app from the play store, on that app also I cannot see the sent messages, I can only see the incoming messages, Thus I realized the issue is with Samsung messaging app.
Appreciated any can provide another working solution for this device.