windows-phone-8 – Windows Phone 8检查位置是否打开/关闭?
发布时间:2020-12-14 02:14:27 所属栏目:Windows 来源:网络整理
导读:我想检查位置服务是否已打开或关闭,因此我可以通知用户他需要打开它以便在地图上查看他的位置.还想检查飞行模式是否打开/关闭以及是否打开/关闭WiFi.有什么建议? 解决方法 位置: Geolocator locator = new Geolocator();if (locator.LocationStatus == Pos
我想检查位置服务是否已打开或关闭,因此我可以通知用户他需要打开它以便在地图上查看他的位置.还想检查飞行模式是否打开/关闭以及是否打开/关闭WiFi.有什么建议?
解决方法
位置:
Geolocator locator = new Geolocator(); if (locator.LocationStatus == PositionStatus.Disabled) { // Location is turned off } 有关网络内容,请参阅 bool isWifiOn = DeviceNetworkInformation.IsWiFiEnabled; 另见:How to detect network changes for Windows Phone (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows-mobile – 在紧凑的框架3.5中播放mp3声音有一种干净
- 需要帮助在Windows上为python27构建调试lxml
- 检测uint64_t整数溢出与C的乘法
- win10 uwp 渲染原理 DirectComposition 渲染
- windows-server-2003 – 如何最好地将服务器迁移到新硬件
- powershell – Windows删除文件夹’.’
- windows – 无法在IE10浏览器中模拟IE7
- Windows UWA(IoT)蓝牙RfcommService
- active-directory – 检查WQL中的缺失值或(WQL / WMI过滤器
- windows – 在机器启动时运行Powershell脚本?