问题
I'm trying to mock locations using the Play Services LocationClient. I have:
- Added the
ACCESS_MOCK_LOCATIONpermission. - Called
setMockMode(true)on myLocationClient - 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