@Override
public WellKnownRecord decodePayload(byte[] payload, NdefMessageDecoder messageDecoder) {
byte actionFlag = payload[0];
GcActionRecord actionRecord = null;
if ((actionFlag & GcActionRecord.NUMERIC_CODE) != 0) {
Action action = Action.getActionByValue(payload[1]);
actionRecord = new GcActionRecord(action);
}
else {
Record record = messageDecoder.decodeToRecord(payload, 1, payload.length - 1);
actionRecord = new GcActionRecord(record);
}
return actionRecord;
}