Code example for ClipboardManager

Methods: removePrimaryClipChangedListener

0
	 
	@Override 
	public void onPause() { 
		super.onPause(); 
		 
		clipboard.removePrimaryClipChangedListener(this);
	} 
	 
	@Override 
	public void onResume() { 
		super.onResume(); 
		 
		clipboard.addPrimaryClipChangedListener(this);
		checkClipboard(); 
	} 
 
	@Override 
	public void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		 
		// It's not valid to run fragments transactions after this