Skip to content

Instantly share code, notes, and snippets.

@nex3z nex3z/SimpleObserver.java
Last active Mar 6, 2016

Embed
What would you like to do?
public class SimpleObserver extends ContentObserver {
private static final String LOG_TAG = SimpleObserver.class.getSimpleName();
public SimpleObserver(Handler handler) {
super(handler);
}
@Override
public void onChange(boolean selfChange) {
this.onChange(selfChange, null);
}
@Override
public void onChange(boolean selfChange, Uri uri) {
Log.v(LOG_TAG, "onChange(): selfChange = " + selfChange + ", uri = " + uri);
}
}
/*
context.getContentResolver().registerContentObserver(ScheduleContract.ScheduleEntry.CONTENT_URI, true, observer);
context.getContentResolver().unregisterContentObserver(observer);
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.