是否有可能获得15mts的纬度和经度值一次?

时间:2012-01-11 12:44:41

标签: android latitude-longitude

我正在尝试很长的一天。但是我仍然很难获得纬度和经度值。我的目标是获得15mts的纬度和经度值.am搜索并尝试关注链接 http://developer.android.com/reference/android/location/LocationManager.html

http://about-android.blogspot.com/2010/04/find-current-location-in-android-gps.html

http://www.firstdroid.com/2010/04/29/android-development-using-gps-to-get-current-location-2/

添加此行时出现错误Is it possible to get the latitude and longtitude value for 15mts once?

错误更新

01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011): Error parsing response: 
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011): org.json.JSONException: Value <HTML><HEAD> of type java.lang.String cannot be converted to JSONArray
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at org.json.JSON.typeMismatch(JSON.java:107)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at org.json.JSONArray.<init>(JSONArray.java:91)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at org.json.JSONArray.<init>(JSONArray.java:103)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.google.android.googlequicksearchbox.google.GenieClient.sendGenieSearchRequest(GenieClient.java:509)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.google.android.googlequicksearchbox.google.GenieClient.executeGenieRequest(GenieClient.java:476)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.google.android.googlequicksearchbox.google.GenieClient.query(GenieClient.java:205)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.google.android.googlequicksearchbox.google.GenieClient.queryInternal(GenieClient.java:165)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.android.quicksearchbox.google.GoogleSource.getSuggestions(GoogleSource.java:120)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.android.quicksearchbox.google.GoogleSource.getSuggestions(GoogleSource.java:35)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.android.quicksearchbox.QueryTask.run(QueryTask.java:62)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at java.lang.Thread.run(Thread.java:1096)
01-08 18:05:05.797: WARN/QSB.SuggestionProvider(2011):     at com.android.quicksearchbox.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:45)

1 个答案:

答案 0 :(得分:0)

请检查

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,15, locationListener);