Code example for NdefRecord

0
        return msg;
    } 
 
    private NdefRecord createMimeRecord(String mimeType, byte[] payload) {
        byte[] mimeBytes = mimeType.getBytes(Charset.forName("US-ASCII"));
        NdefRecord mimeRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, mimeBytes, new byte[0],
                payload);
        return mimeRecord;
    } 
 
    @Override 
    public void closeBeam() { 
        mActivity = null;
    } 
 
} 
Experience pair programming with AI  Get Codota for Java