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();
Experience pair programming with AI  Get Codota for Java
4
CodeRank

Further Reading