2013-05-07 113 views
0

如何使用窗口手机API显示位置设置的链接。我能够显示启用Wifi的链接,但无法找到任何地方如何显示位置设置Windows Phone的位置设置

回答

0

你不能这样做..因为位置设置是特定于每个应用程序。这也是MS的实施方式。否则你的应用程序将被拒绝。因此,您的应用程序应该有一个设置选项,用户可以在其中禁用并启用应用程序的位置访问权限。但在访问位置时,您还必须考虑“电话位置”访问设置。

GeoCoordinateWatcher g = new GeoCoordinateWatcher(); 
      g.Start(); 
      if (g.Permission.Equals(GeoPositionPermission.Granted)) 
      { 
       // Check application level access and proceed 
      } 
      else if (g.Permission.Equals(GeoPositionPermission.Denied) || g.Permission.Equals(GeoPositionPermission.Unknown)) 
      { 
       // Your code/message to the user notifying about location access being disabled at the device level 
      }