use*_*544 2 c# proximity windows-phone-8
我得到一个例外
"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" on the code for Proximity (Windows Phone 8)`
ProximityDevice device = ProximityDevice. GetDefault ();
Run Code Online (Sandbox Code Playgroud)
请让我知道原因
您是否在项目清单中添加了NFC功能?您需要在visual studio中打开WMAppManifest.xml文件,进入Capabilities选项卡并选择ID_CAP_PROXIMITY,然后一切正常工作:)