1、 String searchQuery = "column1 like '%" + searchKey + "%' or column2 like '%" + searchKey + "%'";html
String searchQuery 2= "column1 like ? or column2 like?"; android
c = getContentResolver().query(uri, null, searchQuery, null,"date DESC");
git
2、Cursor cursor = contentResolver.query(android.provider.ContactsContract.Contacts.CONTENT_URI, github
new String[]{android.provider.ContactsContract.Contacts.DISPLAY_NAME}, app
android.provider.ContactsContract.Contacts.DISPLAY_NAME + "=?", new String[]{"張三"}, null); ide
3、經過觀察者模式監聽媒體庫的變化實現APP本地數據自動更新:spa
http://zmywly8866.github.io/2015/03/03/auto-update-app-data.htmlhtm