Android LocationClient mock location not set

我的未来我决定 提交于 2019-12-24 00:58:05

问题


I'm trying to mock locations using the Play Services LocationClient. I have:

  1. Added the ACCESS_MOCK_LOCATION permission.
  2. Called setMockMode(true) on my LocationClient
  3. Called setMockLocation(Location)

However, when I call getLastLocation(), I always get null. No updates are pushed to the LocationListener, and the null never changes.

来源:https://stackoverflow.com/questions/24690209/android-locationclient-mock-location-not-set

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!