Exemple #1
0
        public bool WriteApplication(string packageName, object tag)
        {
            if (!(tag is Tag))
            {
                return(false);
            }
            if (string.IsNullOrEmpty(packageName))
            {
                return(false);
            }

            WriteResult writeResult = WriteResult.FAILED;

            try
            {
                NdefRecord  packageRecord = NdefRecord.CreateApplicationRecord(packageName);
                NdefMessage ndefMessage   = new NdefMessage(new NdefRecord[] { packageRecord });
                writeResult = WriteTag(ndefMessage, (Tag)tag);
            }
            catch { }
            return(writeResult == WriteResult.OK);
        }
Exemple #2
0
        public NdefMessage CreateNdefMessageCallback()
        {
            NdefMessage msg = new NdefMessage(new NdefRecord[] { NdefRecord.CreateApplicationRecord("icReader.FTJL") });

            return(msg);
        }