Code example for ContentObserver

Methods: onChange

0
	/** 
	 * Returns the latest application state. 
	 */ 
	public JSONObject getLatestState() {
		if (!mObservingUpdates) {
			mObserver.onChange(false);
		} 
		return mLatestObj;
	} 
 
	public int getLastTurnNumber() { 
		if (!mObservingUpdates) {
			mObserver.onChange(false);
		} 
		return mLastObjCount;
	} 
 
	/** 
	 * Override this method to handle state updates to this turn-basd app. 
	 */ 
	protected abstract void onStateUpdate(JSONObject json);