Code example for ClipboardManager

Methods: getTexthasText

0
     
     
    void getclip(){ 
    	ClipboardManager clipman= (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
  
		if(clipman.hasText()){
			clipdata = clipman.getText().toString();
		} 
		 
		else 
		{ 
			clipdata = "";
			Toast.makeText(getApplicationContext(),"No text",Toast.LENGTH_LONG).show();
		} 
    	 
		 
    	} 
		 
     
    void onshake(float x,float y, float z,long diffTime) {
Stop searching for code, let great code find you!  Add Codota to your java IDE