Code example for ClipboardManager

Methods: setText

			//print out regID in log  
			Log.d(TAG, String.format("Reg Id: %s", regId));
			//Copy to clipboard 
			ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 
			//Notify user via Toast 
			Toast.makeText(this, "Registration ID copied to clipboard", Toast.LENGTH_LONG).show();
	 * @author liuisaac 
	 * This is our broadcast receiver class to receive intents that's sent from C2DMReceiver 
	class IdReceiver extends BroadcastReceiver {
		public void onReceive(Context context, Intent intent) {
			Log.d("IdReceiver", "onReceived");
Contextual code suggestions in your IDE  Get Codota for Java