Code example for NdefRecord

0
        byte[] data = new byte[1 + langBytes.length + textBytes.length]; 
        data[0] = (byte) status;
        System.arraycopy(langBytes, 0, data, 1, langBytes.length);
        System.arraycopy(textBytes, 0, data, 1 + langBytes.length, textBytes.length);
 
        return new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], data);
    } 
 
 
    // Display a dialog 
    private void alertMsg(String msg) {
 
    	AlertDialog.Builder builder = new AlertDialog.Builder(this);
    	builder.setMessage(msg)
    		.setCancelable(false)
    		.setPositiveButton("OK", null);
    	AlertDialog alert = builder.create();
    	alert.show();
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java