Code example for NdefRecord

0
     * @param packageName Android package name 
     * @return Android application NDEF record 
     */ 
    public static NdefRecord createApplicationRecord(String packageName) {
        try { 
            return new NdefRecord(NdefRecord.TNF_EXTERNAL_TYPE, RTD_ANDROID_APP, new byte[] {},
                    packageName.getBytes("US-ASCII"));
        } catch (UnsupportedEncodingException e) {
            return null; 
        } 
    } 
}