我怎样才能在Android中读取短信? [英] How i can read sms in Android?

查看:185
本文介绍了我怎样才能在Android中读取短信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我就知道一件事有关SMS ...

I would know one thing about SMS...

我知道这是在Android中可以读短信,但我不知道我怎么能读未读短信,特别是如何加入到每个字段,如发件人,短信,日期 时间,文本。

I know that is possible read SMS in Android, but I don't know how I can read "Unread SMS", and in particular how to accede to each field like "sender", "SMS", "date", "time", "text".

什么是我必须做的是:当接收到一个短信,应用程序读取的消息,并存储在数据结构中的所有信息。

What that i must do is: when a sms is received, an application "reads" the message and stores all the information in a data structure.

要点:
另外一个问题:是否有可能改为未读短信在WhatsApp的或其他的IM应用程序(例如Facebook的信使)?
而在这种情况下,我怎么能答应每个字段?

IMPORTANT: Another question: is it possible read "Unread SMS" in WhatsApp or other IM application (for example facebook messenger) ? And in this case how I can accede to each field ?

问候

推荐答案

读短信电话

检查了这一点<一个href=\"http://stackoverflow.com/questions/848728/how-can-i-read-sms-messages-from-the-inbox-programmatically-in-android\">How我可以以编程方式在Android的收件箱读取短信?

阅读Facebook的消息

对于Facebook需要实现自己的API。看到这个阅读Facebook的邮件

For facebook you need to implement their API. See this Read Messages in Facebook

选项1

WhatsApp的没有公布任何官方的API。

Whatsapp did not publish any official APIs.

有与WhatsApp的沟通这个开源API,它不是正式的,并且可能停止工作,如果WhatsApp的更新自己的协议。

There's this open source API for communicating with whatsapp, it's not official and might stop working if Whatsapp update their protocols.

https://github.com/venomous0x/WhatsAPI

关于使用本或其他非公务API的合法性,这取决于您使用WhatsApp的同意服务协议。读它,看看他们看不惯他们使用的通信协议与比他们的其他客户端。我的猜测是他们不答应。

Regarding the legality of using this or other non-official API, it depends on the service agreement that you agreed to with Whatsapp. Read it and see if they frown upon using their communication protocols with clients other than theirs. My guess would be they do not allow it.

选项2

WhatsApp的,使你的SD卡凌晨4点聊天备份的每一天。这是与AES密钥加密单个数据库。既然是在外部存储,应用程序可以读取它,如果你有机会到外部存储。

WhatsApp makes a chat backup everyday at 4 AM on your SD Card. This is a single database encrypted with an AES key. Since it is on the external storage, your app can read it if you have access to the external storage.

您可以很容易地解密这个数据库(也就是在这个网上可用纸)。

You can easily decrypt this database (there is a paper available on this online).

然而,这样只会让你的聊天记录更新一次,每24小时。

However, this will only give you updated chats once every 24 hours.

如果你想要更多的实时更新,您的设备必须植根,您将需要一个完全新的解析器,作为内部存储的聊天记录都存储在多个数据库。

If you want more realtime updates, your device has to be rooted, and you will need a completely new parser, as on the internal storage the chats are stored in more than one database.

选项3

阅读这太问题获得来自WhatsApp的所有邮件

注意:我不知道的东西的WhatsApp。这只是一个各岗位编制在一起。

NOTE: I am not sure about the Whatsapp stuff. It's just a compilation of various posts together.

这篇关于我怎样才能在Android中读取短信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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