Geo Fix not working in Android SDK 2.2

混江龙づ霸主 提交于 2020-01-24 18:14:25

问题


I am trying to test an Android application. I need to send mock location to test this. I have registered for requestlocation updates(..)method (as follows)

locationManager.requestLocationUpdates(bestProvider, 20000, 0, this);

Tried sending mock locations through Eclipse DDMS tab as well as telnet-ing from command prompt. telnet commands as follows

telnet localhost 5554
geo fix 1 1

The application works fine (i.e. receives the location changed event) if I run using AVD Emulator using 1.6 to 2.1. However, it is not working for AVD Emulator 2.2. I am using SDK platform Android 2.2 revision 2.

Does anyone come across similar issue? How did you resolve this?

PS. Extra Information. I have selected 'Allow Mock Locations' in all emulators (1.6 to 2.2).
Also, the following line is added in Android Manifest

uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"

Issue still persists. Please help


回答1:


See the following bug report for a solution to your problem:

http://code.google.com/p/android/issues/detail?id=4036



来源:https://stackoverflow.com/questions/4262542/geo-fix-not-working-in-android-sdk-2-2

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