我正在使用Geolocator。所以我有異步方法OnPositionChanged(),一切都應該是好的。但是我有訪問位置的問題。如果我使用Windows 8 Sample Geolocation App,一切正常。我有消息,該應用程序使用位置我給予訪問,它的工作原理,但在我的應用程序中,此消息不會出現,並且Geolocator的狀態已禁用。我如何以編程方式訪問我的應用程序的位置?啓用訪問位置Windows 8應用程序(Geolocator)
回答
與Windows Phone類似,使用位置需要您作爲開發人員來顯式聲明您的應用程序將需要訪問位置API。這是在應用程序清單中設置的。在解決方案資源管理器中,查找Package.appmanifest項並雙擊打開 - 清單屬性窗口將打開。
單擊功能選項卡。檢查位置功能(就在它下面)。
非常感謝:)它的作品;) – mskalniak 2013-02-18 13:40:00
賓果。我不知道爲什麼這不會引發異常。我認爲其他功能(例如,如果您忘記檢查文檔庫,然後嘗試訪問它)。這一次失敗會更加默默無聞,特別是如果你不檢查狀態,它也會引發我幾次。 – 2013-02-18 19:00:50
你知道嗎,如何在windows7上編寫應用程序的地理定位?舊配置沒有清單文件。 – 2015-02-17 07:59:24
- 1. 如何在Windows 8上啓用16位應用程序?
- 2. Windows 8 - 啓動地圖應用程序
- 3. Windows 8的應用程序啓動器與WPF應用程序
- 4. ClickOnce應用程序啓動Windows 8應用程序
- 5. Windows 8從桌面應用程序啓動「metro」應用程序?
- 6. Windows Phone 8 - 從應用程序內啓動應用程序
- 7. 從Windows 8應用程序訪問Windows Phone 7上的圖片?
- 8. 爲Windows 8 XAML應用程序設置UIElement的位置
- 9. 從Windows 8應用程序訪問遠程MySQL數據庫
- 10. Windows phone 8 GeoLocator準確性
- 11. Windows Phone 8 GeoCoordinateWatcher vs Geolocator
- 12. Windows(Phone)8 - 啓動Windows啓動的Metro應用程序
- 13. Windows Phone 8 Geolocator在仿真器上返回假位置
- 14. 應用程序在啓用相機訪問設置時崩潰iOS 8
- 15. 在Windows 8應用程序中設置啓動頁面
- 16. MVC3應用程序(Windows身份驗證)啓用匿名訪問
- 17. Windows 8 WPF應用程序
- 18. Windows 8 metro應用程序鍵盤位置改變
- 19. Windows 8地鐵應用程序:訪問按鈕屬性
- 20. 訪問JavaScript中的本地Json文件Windows 8應用程序
- 21. Windows 8商店應用程序C++文件訪問
- 22. PhoneGap在Windows 8中訪問文件系統應用程序
- 23. 訪問控制模板組件(Windows 8應用程序)
- 24. 在Windows 8應用程序中從Goodreads獲取訪問令牌
- 25. Windows 8應用程序和訪問文件系統
- 26. 如何從Windows 8應用程序訪問SQL Server?
- 27. 從Windows 8商店應用程序(WinRT)訪問智能卡
- 28. Windows 8應用程序和Windows Phone應用程序提交
- 29. Windows 8,在啓動時啓動應用程序
- 30. 使用Windows 8/WinRT在Metro應用程序中啓用
看看清單文件和「功能」選項卡,添加「位置」功能 – polkduran 2013-02-18 13:21:31
清單文件是在您的商店項目的根,它被稱爲「Package.appxmanifest」 – polkduran 2013-02-18 13:22:24