简体   繁体   English

您可以通过应用程序在Android手机上访问短信吗?

[英]Can you access the SMS messages on an Android phone from an app?

I am working on an app that scans your messages and presents interesting statistics about your contacts. 我正在开发一款可扫描您的消息并提供有关您的联系人的有趣统计信息的应用程序。 Right now I have it running on my laptop scanning an iPhone SMS database. 现在,我可以在扫描iPhone SMS数据库的笔记本电脑上运行它。 I want to create an app that will allow people to scan their own messages from their phone. 我想创建一个应用程序,使人们可以从手机中扫描自己的消息。 I know this is not possible on iPhone so I am focussing on Android. 我知道这在iPhone上是不可能的,所以我主要关注Android。 Here are the kinds of stats we are calculating: 以下是我们正在计算的统计信息:

http://cl.ly/460S3y3Q3F200o1W2X0Y http://cl.ly/460S3y3Q3F200o1W2X0Y

I have read this answer: 我已阅读此答案:

How can I read SMS messages from the device programmatically in Android? 如何在Android中以编程方式从设备读取SMS消息?

But just wanted to double-check that it is still possible to access the messages on Android phones from within an Android app. 但只是想仔细检查,它仍然可以从Android应用程序访问Android手机的消息。

Is that possible? 那可能吗?

Thanks! 谢谢!

There is no publicly available API on Android SDK that allows you to read the user's SMS messages from within an app. Android SDK上没有公开可用的API,该API可让您从应用程序中读取用户的SMS消息。

As you've found, there are ways in which you can obtain the information using unofficial / undocumented calls. 正如您所发现的,您可以通过多种方式使用非官方/未记录的电话获得信息。 Google themselves do not recommend you do this, because it's not guaranteed to work across all phones, or all versions of Android. Google自己不建议您这样做,因为不能保证它可以在所有手机或所有版本的Android上使用。

So to answer your question: yes, it's technically possible, but probably ill-advised if you're looking to publish your app and have it work successfully across all devices. 因此,请回答您的问题:是的,这在技术上是可行的,但是如果您希望发布自己的应用程序并使其在所有设备上都能正常运行,则建议不要这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM