Code example for Tag

Methods: getId

0
		} 
	} 
	 
	private void handleNfc(Tag tag) {
		if(Build.VERSION.SDK_INT >= 10) {
		    String TagUID = Util.ConvertbyteArrayToHexString(tag.getId());	
 
		    tvNFCID.setText(TagUID);
		     
	    	notifySuccessfulScan();	                                                                                                                                              
		} 
	} 
 
	private void notifySuccessfulScan() { 
		setVolumeControlStream(AudioManager.STREAM_MUSIC); 
		 
        MediaPlayer mp = MediaPlayer.create(this, R.raw.scan);
        Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
         
		mp.start();
Stop searching for code, let great code find you!  Add Codota to your java IDE
4
CodeRank

Further Reading