在未安装应用程序时,有没有办法从NFC标签启动BlackBerry或Windows Phone市场?
我的意思是,就像Android平台上的AAR一样,如果未安装标记所指定的应用程序,则会启动Google Play商店。
感谢。
答案 0 :(得分:2)
以下是如何启动已安装的Windows Phone应用程序或如果未安装重定向到商店:
82a23635-5bd9-df11-a844-00237de2db9e
)。此library on Codeplex可以帮助在Windows Phone上创建此类NDEF记录。
答案 1 :(得分:-1)
从NFC标记接收消息的代码
ProximityDevice device = ProximityDevice.GetDefault();
// Make sure NFC is supported
if (device!= null)
{
long Id = device.SubscribeForMessage ("Windows.SampleMessageType", messageReceived);
Debug.WriteLine("Published Message. ID is {0}", Id);
// Store the unique message Id so that it
// can be used to stop subscribing for this message type
}
private void messageReceived(ProximityDevice sender, ProximityMessage message)
{
Debug.WriteLine("Received from {0}:'{1}'", sender.DeviceId, message.DataAsString);
openMarketPlace(message.DataAsString);
}
如何获取应用ID以在市场上打开应用页面
private void openMarketPlace(string appID){
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentIdentifier = appID;
marketplaceDetailTask.Show();
}