當ContentObserver所觀察的Uri發生變化時,便會觸發它。觸發器分爲表觸發器、行觸發器,
相應地ContentObserver也分爲“表“ContentObserver、“行”ContentObserver,當然這是與它所監聽的Uri MIME Type有關的
1. 通過Uri uri = Uri.withAppendedPath(數據庫URI,”數據庫的某一列”);在insert或者update的時候getContext().getContentResolver().notifyChange(uri,null);
2. 在mContentResolver.registerContentObserver(mUri,false, loginConetentOberser);裏面的mUri爲Uri: content://contacts/people/數據庫的某一行值
3. --常量 UriMatcher.NO_MATCH 表示不匹配任何路徑的返回碼
--# 號爲通配符
--* 號爲任意字符
Cursor.setnotificationuri
用來通知Cursor本身數據變化,
http://stackoverflow.com/questions/21623714/what-is-cursor-setnotificationuri-used-for