开发者

A way to mock satalites data (count, SNRs)

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜