Example usage for android.nfc.tech NfcV get

List of usage examples for android.nfc.tech NfcV get

Introduction

In this page you can find the example usage for android.nfc.tech NfcV get.

Prototype

public static NfcV get(Tag tag) 

Source Link

Document

Get an instance of NfcV for the given tag.

Usage

From source file:de.berlin.magun.nfcmime.core.RfidDAO.java

/** 
 * @param tag Tag/*w  w  w . j  a v  a 2 s  .com*/
 * @return a hexadecimal String representation of a Tag's ID or UID
 */
public String getTagId(Tag tag) {

    // get the ID byte array
    byte[] id = tag.getId();

    if (NfcV.get(tag) != null) {
        ArrayUtils.reverse(id);
    }

    return new String(Hex.encodeHex(id));
}