Code example for NdefRecord

Methods: getPayload

0
		String scheme = uri.getScheme();
		return (scheme != null && scheme.equals("ndef+bluetooth"));
	} 
	 
	@Override 
	public void doConnectionHandover(NdefMessage handoverMessage, int handover, int record) throws IOException {
		NdefRecord handoverRequest = handoverMessage.getRecords()[record];
		String uriString = new String(handoverRequest.getPayload());
		Uri target = Uri.parse(uriString);
		 
		String mac = target.getAuthority();
		UUID uuid = UUID.fromString(target.getPath().substring(1));
		DuplexSocket socket = new BluetoothDuplexSocket(mmBluetoothAdapter, mac, uuid);
		new NdefExchangeThread(socket, mNdefExchange).start();
	} 
}