开发者

A way to mock satalites data (count, SNRs)

开发者 https://www.devze.com 2023-03-02 09:07 出处:网络
LocationManager.addTestProv开发者_开发问答ider() gives an easy way to mock the location. However, in this case, LocationManager.getGPSStatus() still returns empty data and this can cause software to t

LocationManager.addTestProv开发者_开发问答ider() gives an easy way to mock the location. However, in this case, LocationManager.getGPSStatus() still returns empty data and this can cause software to think that there is no GPS signal. Is there a way to control the data which is returned by getGPSStatus()?


Create an adapter around LocationManager. Have this API adapt, aka work the way you want. Easier to mock plus you can control what you return each time.

0

精彩评论

暂无评论...
验证码 换一张
取 消