【问题标题】:Samsung A71 unable to read outgoing messages with telephony provider三星 A71 无法通过电话提供商读取传出消息
【发布时间】:2021-03-29 18:10:02
【问题描述】:

无法使用电话内容提供程序读取所有发送和接收的消息。我正在使用三星 A71 设备,我正在使用电话服务阅读所有消息

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);  

}

但我只能收到传入消息我无法通过电话服务收到任何传出消息。

我尝试过使用easy-content-providers 库,它也只显示传入的消息。 https://github.com/EverythingMe/easy-content-providers

如何在三星 A71 中接收传出消息?有人可以帮我解决这个问题吗?

【问题讨论】:

  • /inbox 似乎特定于传入的消息。您是否尝试过使用Telephony.Sms.Outbox.CONTENT_URI
  • 在我的情况下,我需要传入和传出消息,无论如何我尝试使用此Telephony.Sms.Outbox.CONTENT_URI 我有 0 个结果,仅三星 A71 设备存在此问题,其他设备正在检索所有消息跨度>

标签: android android-contentresolver telephonymanager


【解决方案1】:

最后,我知道三星 A71 默认消息应用程序在将消息存储在设备中时没有使用 android 消息格式,这就是我无法在 A71 设备上读取已发送消息的原因。

我怎么知道的? 我从 Play 商店安装了其他一些消息应用程序,在该应用程序上我也看不到发送的消息,我只能看到传入的消息,因此我意识到问题出在三星消息应用程序上。

感谢任何可以为此设备提供另一种工作解决方案。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-19
    • 1970-01-01
    • 2019-12-24
    • 2016-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多