How to access the SMS storage on Android?

eternalmatt picture eternalmatt · Jan 26, 2011 · Viewed 151.6k times · Source

Beginner Android dev here.

I'm trying to create an app that will read the SMS messages stored on the device and then give the user statistics about their habits (like who they message often, common words, etc).

But to my knowledge, there doesn't seem to be a way to do this. I've looked around on forums and the most anyone talks about is accessing the inbox where you can find messages the user hasn't read. How then can the default app and third-party (Handcent for example) display the same texts? They don't keep their own database because Handcent will display all texts upon fresh install.

tl;dr: How do I read SMS messages on an Android devices, specifically messages that have been read before.

Answer

Sebastian Paaske Tørholm picture Sebastian Paaske Tørholm · Jan 26, 2011

For a concrete example of accessing the SMS/MMS database, take a look at gTalkSMS.