Code example for NdefRecord

Methods: getPayloadgetTnfgetType

    public String getSnippet(Context context, Locale locale) {
        return mType;
    public static MimeRecord parse(NdefRecord record) {
        Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_MIME_MEDIA);
        String type = new String(record.getType(), Charset.forName("US-ASCII"));
        byte[] payload = record.getPayload();
        return new MimeRecord(type, payload);
    public static boolean isMime(NdefRecord record) {
        try { 
            return true; 
        } catch (IllegalArgumentException e) {
            return false; 
Connect your IDE to all the code out there  Get Codota for Java