标签:
一、 String searchQuery = "column1 like ‘%" + searchKey + "%‘ or column2 like ‘%" + searchKey + "%‘";
String searchQuery 2= "column1 like ? or column2 like?";
c = getContentResolver().query(uri, null, searchQuery, null,"date DESC");
二、Cursor cursor = contentResolver.query(android.provider.ContactsContract.Contacts.CONTENT_URI,
new String[]{android.provider.ContactsContract.Contacts.DISPLAY_NAME},
android.provider.ContactsContract.Contacts.DISPLAY_NAME + "=?", new String[]{"张三"}, null);
三、通过观察者模式监听媒体库的变化实现APP本地数据自动更新:
http://zmywly8866.github.io/2015/03/03/auto-update-app-data.html
标签:
原文地址:http://my.oschina.net/u/1389206/blog/466061