end day
This commit is contained in:
@@ -12,11 +12,14 @@ namespace CampusAppWP8.Utility
|
||||
using System.Device.Location;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Windows.Networking.Proximity;
|
||||
|
||||
/// <summary>
|
||||
/// Collection of utility functions.
|
||||
@@ -276,5 +279,19 @@ namespace CampusAppWP8.Utility
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Writes a nfc tag.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="tagContent">The tag content.</param>
|
||||
/// <param name="action"> The action.</param>
|
||||
public static void WriteNfcTag(string tagContent)
|
||||
{
|
||||
NDEFMessage ndef = new NDEFMessage(tagContent, NDEFMessage.TYPEVAL.TEXT);
|
||||
ProximityDevice device = ProximityDevice.GetDefault();
|
||||
if (device != null)
|
||||
{
|
||||
device.PublishBinaryMessage("NDEF:WriteTag", ndef.ToByteArray().AsBuffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user