Code example for Tag

Methods: getId

0
		if (someTag == null)
			id.setText("No tag");
		else { 
			// the id is in bytes and needs to be converted to a String thanks to  
			// the method toHexString 
			String _id = toHexString(someTag.getId());
			try { 
				id.setText(_id);
				new SendBottleDataToREST().execute(_id); // call async task
			} catch (Exception e) {
				Log.i("EXCPT", "UNSUPPORTED ENCODING EXCEPTION");
				throw new RuntimeException("UNSUPPORTED ENCODING EXCEPTION");
			} 
		} 
	} 
 
	// async task with the responsibility to execute a HTTP PUT call to the RESTful web service 
	// to push the id and the temperature of the Tag 
	class SendBottleDataToREST extends AsyncTask<String, Void, String> {
 
		@Override