You need to override deliverSelfNotifications() to return true.
class ObserverSms extends ContentObserver {
private Context mContext;
public ObserverSms(Context context, Handler handler) {
super(handler);
mContext = context;
}
@Override
public boolean deliverSelfNotifications() {
return true;
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
MyLog.logDebugInConsole(TAG, "Sms Database Changed");
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…