代码之家  ›  专栏  ›  技术社区  ›  Migol

安卓1.5:阅读短信

  •  7
  • Migol  · 技术社区  · 16 年前

    我正在为Android创建一个备份实用程序,我需要读取收件箱、发件箱和dratfs的内容。如何在SDK v1.5上实现这一点?

    2 回复  |  直到 16 年前
        1
  •  17
  •   Community Mohan Dere    8 年前
        2
  •  -11
  •   hlovdal    16 年前

    如果可以打开与内部调制解调器的连接并运行 AT commands (不确定这是如何完成的),然后可以通过以下方式进行备份(删除注释):

    AT+CSCS="UTF8"      // select character set
    AT+CMEE=2           // turn on extended error reporting
    AT+CPMS="ME","ME"   // select message storage in the phone
    AT+CMGL=4           // read all messages
    AT+CPMS="SM","SM"   // select message storage on SIM
    AT+CMGL=4           // read all messages
    

    当然,您应该在发出每个命令后等待OK。提到 27.005 27.007