简体   繁体   中英

Mock location in windows 8 desktop application

我正在使用Geolocator在Windows 8桌面应用程序中获取设备位置,有没有一种方法可以通过让OS通过设置模拟位置来模拟位置更改来对其进行测试?

Yes!

Same as you would for a phone app, you need to run your app in the visual studio simulator.

From there, you can change settings such as simulated location.

See the guide here https://msdn.microsoft.com/library/windows/apps/hh441475(v=vs.120).aspx#BKMK_Set_the_simulated_geo_location_of_the_device

You can use this tool https://github.com/juliankay/FakeGPS

FakeGPS is a Windows driver which allows the user to provide geolocation information without a physical GPS device.

I tried it and it works great.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM