According to the 4.4 SMS APIs, the new version provides functionality to:
allow apps to read and write SMS and MMS messages on the device
I can't find any information on this functionality, nor any samples in the new SDK. This is what I have so far for reading new incoming messages.
However, I would like to read existing messages stored on the deivce:
// Can I only listen for incoming SMS, or can I read existing stored SMS?
SmsMessage[] smsList = Telephony.Sms.Intents.getMessagesFromIntent(intent);
for(SmsMessage sms : smsList) {
Log.d("Test", sms.getMessageBody())
}
Please note: I know about using the SMS Content Provider, however this method is unsupported. According to the linked APIs, I should be able to do this in a supported way.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…