Like the managedQuery() method, one of the constructors for the SimpleCursorAdapter class has been deprecated. For Honeycomb or later devices, you need to use the new constructor for the SimpleCursorAdapter class with one additional argument:
//---Honeycomb and later---
adapter = new SimpleCursorAdapter(
this, R.layout.main, c, columns, views,
CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
The flag registers the adapter to be informed when there is a change in the content provider.
In order for your application to access the Contacts application, you need to have the READ_CONTACTS permission in your AndroidManifest.xml file.