Android Marshmallow上的内容提供商结果中缺少短信 [英] SMS missing from content provider results on Android Marshmallow

查看:106
本文介绍了Android Marshmallow上的内容提供商结果中缺少短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从Samsung S7问世以来,一些文本消息丢失并且从未显示在内容:// sms提供程序URI中。我注意到在同一个运营商(在这种情况下是T-Mobile)上的多个三星设备(S6和/或S7)之间,但可能不限于此。这些短信显示在默认的股票消息应用程序中,但我找不到如何访问它们。请记住,我通过该内容提供商收到97%的短信,但最后3%的短信不在我身上。

Some text messages are missing and never show in the content://sms provider URI since the Samsung S7 came out. I have noticed this between multiple Samsung devices (S6 and/or S7) that are on the same carrier (in this case T-Mobile) but may not be limited to. These text messages are showing in the default stock messaging app, but I cannot find how to access them. Keep in mind that I receive 97% of text messages just fine through that content provider, but that last 3% eludes me.

Uri uri = Uri.parse("content://sms/");
String[] projection_sms = { "*" };
Cursor cursor = getContentResolver().query(uri, projection_sms, "", null, null);

我还在SIM卡内查看丢失的短信是否存在,但一无所获:

I have also looked within the SIM card to see if the missing SMS may be there and found nothing:

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

我也经历了所有彩信,发现他们也不在。

I have gone through all MMS as well to find that they are not in there either.

<uses-permission android:name="android.permission.READ_SMS" />

在这种情况下,我只想阅读短信,根据Android文档,您只需要以上内容允许从SMS / MMS数据库读取。我意识到在KitKat中有一个更改允许应用程序替换默认的股票应用程序,但在这种特殊情况下我只想阅读短信。

I only want to read SMS in this case and according to the Android docs you would only need the above permission to read from the SMS/MMS db. I realize that in KitKat there was a change which allowed an app to replace the default stock app, but in this particular case I only want to read SMS.

所以如果那些短信不在数据库中的正确位置,不在SIM卡中,那么地球上的地方(或者我应该在Android中说的那样)会是什么?

So if those SMS are not in the correct places in the db and are not in the SIM card, then where on Earth (or should I say in Android) would they be?

推荐答案

似乎缺少的消息实际上不是短信,而是 RCS 消息。这些不存储在SMS提供程序中,因此不会从对它的任何查询返回,尽管支持RCS的设备上的消息传递应用程序可能无缝地一起显示它们。这可以解释为什么您的查询结果似乎不完整。

It seems the messages that are missing are in fact not SMS, but RCS messages. These are not stored in the SMS Provider, and therefore will not be returned from any queries to it, though messaging apps on devices that support RCS are likely to display them all together seamlessly. This would explain why it appears that your query results are incomplete.

RCS(富通信服务)基本上是增强型短信/彩信,提供实时功能,例如除了常规的文本消息之外,还可以进行一对一和群聊,视频通话,内容共享等。目前,Android中没有标准API用于此,但据报道谷歌正在采用此作为SMS / MMS的最终替代品。但是,我找不到关于如何集成或部署它的官方消息。

RCS (Rich Communication Services) is basically enhanced SMS/MMS, offering functionalities such as real-time one-to-one and group chat, video calling, content sharing, etc., in addition to regular ol' text messaging. Currently, there is no standard API in Android for this, though Google is reportedly in the process of adopting this as an eventual replacement for SMS/MMS. I could find no official word on how this will be integrated or deployed, however.

并非每个运营商都提供RCS,而且那些拥有专用的专有应用和API的运营商处理它。当然,对于每个运营商/制造商来说,这些都会有所不同,甚至品牌也会有很大差异。大多数人称之为 joyn ,而T-Mobile将其称为 Advanced Messaging 。随着RCS变得越来越普及,它应该变得更加标准化,但是当前在您的应用中支持RCS将需要专门的组件和设置。

Not every carrier offers RCS, and those that do have dedicated, proprietary apps and APIs to handle it. These, of course, are going to be different for each carrier/manufacturer, and even the branding varies widely. Most call it joyn, whereas T-Mobile brands it as Advanced Messaging. As RCS becomes more commonplace, it should become more standardized, but supporting RCS in your app currently will require specialized components and setups.

这篇关于Android Marshmallow上的内容提供商结果中缺少短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆