Windows Phone 8 NFC 是否支持基于 Mifare Ultralight/Classic 的标签?我使用此代码访问诺基亚 Lumia 920 上的 NFC 设备(代码示例取自NDEF Tag Reader – NFC NDEF Tag Reader)
public partial class MainPage : PhoneApplicationPage
{
public MainPage()
{
InitializeComponent();
ProximityDevice device = ProximityDevice.GetDefault();
device.DeviceArrived += DeviceArrived;
device.DeviceDeparted += DeviceDeparted;
device.SubscribeForMessage("NDEF", MessageReceived);
}
private void DeviceArrived(ProximityDevice sender)
{
// this event occurs when I am tapping any of my tags (tried 5 different Mifare Ultralight/Classic)
}
private void DeviceDeparted(ProximityDevice sender)
{
// this event occurs when I am moving away any tag
}
private void MessageReceived(ProximityDevice sender, ProximityMessage message)
{
// this event is never fired!!! :(
}
}
WP8 上的 NFC 有缺陷还是此代码错误?
更新: 从本文档NFC 论坛类型标签中,您可以发现 Mifare Ultralight 与 NDEF 兼容。Android 设备可以轻松读取此类标签。