android使用技巧知识
//监听数据库变化class SmsContent extends ContentObserver { private Cursor cursor = null; public SmsContent(Handler handler) { super(handler); } @Override public void onChange(boolean selfChange) { super.onChange(selfChange); } } }SmsContent content = new SmsContent(new Handler()); // 注册短信变化监听 this.getContentResolver().registerContentObserver( Uri.parse("content://sms/"), true, content);