I want to retrieve the SMS messages from the device and display them?
This post is a little bit old, but here is another easy solution for getting data related to SMS content provider in Android:
Use this lib: https://github.com/EverythingMe/easy-content-providers
Get all SMS:
TelephonyProvider telephonyProvider = new TelephonyProvider(context);
List smses = telephonyProvider.getSms(Filter.ALL).getList();
Each Sms has all fields, so you can get any info you need:
address, body, receivedDate, type(INBOX, SENT, DRAFT, ..), threadId, ...
Gel all MMS:
List mmses = telephonyProvider.getMms(Filter.ALL).getList();
Gel all Thread:
List threads = telephonyProvider.getThreads().getList();
Gel all Conversation:
List conversations = telephonyProvider.getConversations().getList();
It works with List or Cursor and there is a sample app to see how it looks and works.
In fact, there is a support for all Android content providers like: Contacts, Call logs, Calendar, ... Full doc with all options: https://github.com/EverythingMe/easy-content-providers/wiki/Android-providers
Hope it also helped :)