有没有没有 SMS 内容提供商的 Android 手机?
我正在编写一个应用程序,它需要读取用户的短信以进行基本操作。谷歌表示,SMS 内容提供商不受支持,并且可能不会出现在某些手机中,或者可能无法在未来版本的 Android 中运行。我想知道是否有人知道没有短信内容提供商的特定手机?我知道这个问题已经被问过 -
是有没有手机没有短信收件箱内容提供商?但没有人提供答案。 或者,如果有人可以建议一种使用标准 API 读取传入和传出消息的方法,那就更好了。
I'm writing an app which needs to read the user's text messages for it's basic operation. Google says, SMS content provider is not supported and may not be present in certain phones, or may not work in future versions of Android. I would like to know if anyone knows of any specific phones without the SMS content provider? I know the question has already been asked -
Is there any phone that doesn't have sms inbox content provider? but no one has provided an answer.
Alternatively, if someone could suggest a way of reading incoming and outgoing messages using a standard API, that would be even better.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我还没有找到一款没有短信内容提供商的手机(至少从谷歌搜索中是这样)。我认为制造商不会冒破坏与众多短信应用程序(它们都使用此私有 API)兼容性的风险。
此外,目前似乎还没有标准方法来访问传入和传出消息。
更新:这已成为 4.4 的公共 API - https://developer.android .com/reference/android/provider/Telephony.html
I haven't been able to find a phone without an SMS content provider (at least from Google searches). I don't think manufacturers would take the risk of breaking compatibility with the numerous SMS applications out there (which all use this private API).
Also, at this point there seems to be no standard way to access both incoming and outgoing messages.
Update: This has been made a public API with 4.4 - https://developer.android.com/reference/android/provider/Telephony.html
使用
此 uri,您可以阅读收件箱以及已发送的项目。
而manifest文件中的用户权限是
and
Use this uri u can read inbox as well as the sent items.
And the user permission in the manifest file is