正試圖長期Days.But我仍惹上麻煩的緯度和經度value.My目標是獲得15mts once.am搜索的緯度和經度值,並試圖跟隨鏈接 http://developer.android.com/reference/android/location/LocationManager.html是否有可能一次獲得15mts的緯度和經度值?
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)
我認爲與使用的LocationManager的,你可以得到latitue和經度。但是,如果你不能得到它,然後檢查你的設備上是否有GPS。第二件事情是使用位置你可以得到兩個緯度和經度之間的距離。請檢查此鏈接http://developer.android.com/reference/android/location/Location.html – 2012-01-11 13:40:59