Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enter Location text entry is non-responsive #23

Open
dpecenka opened this issue Jul 30, 2020 · 1 comment
Open

Enter Location text entry is non-responsive #23

dpecenka opened this issue Jul 30, 2020 · 1 comment

Comments

@dpecenka
Copy link

I just downloaded this sample app today, entered my API key, built and ran the app on a physical device. The map correctly identifies my current location. If I press and hold a given destination on the map, I can get a route (actually a couple of choices) and begin navigation. But, if I type into the Enter Location text box, an empty drop down list appears even though I typed in a valid address (I typed the exact address into the MapQuest app and it presented it in the search results view). I can see the following exception was thrown. Can you please advise on how to fix it, or better yet, update the reference app so that it works?

The android device is a Samsung Galaxy Active Pro. Android version 9. The device works well with the MapQuest app -- so it's this app that seems to have a problem.

Thanks,
Dave

2020-07-30 17:20:00.717 22173-22173/com.mapquest.navigation.sampleapp E/SearchAheadService: SearchAhead request error:
com.android.volley.ParseError: org.json.JSONException: End of input at character 0 of
at com.mapquest.android.commoncore.util.VolleyUtil.responseError(VolleyUtil.java:27)
at com.mapquest.android.searchahead.JsonNetworkResponseRequest.parseNetworkResponse(JsonNetworkResponseRequest.java:61)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:123)
Caused by: org.json.JSONException: End of input at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:449)
at org.json.JSONTokener.nextValue(JSONTokener.java:97)
at org.json.JSONObject.(JSONObject.java:159)
at org.json.JSONObject.(JSONObject.java:176)
at com.mapquest.android.commoncore.util.VolleyUtil.parseJsonObject(VolleyUtil.java:31)
at com.mapquest.android.searchahead.JsonNetworkResponseRequest.parseNetworkResponse(JsonNetworkResponseRequest.java:59)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:123) 

@dpecenka
Copy link
Author

The problem is that it's trying to access a non-existent server. The base url is:
http://searchahead-public-api-b2c-staging.cloud.mapquest.com/search/v3/prediction.
This url is found in com.mapquest:search-ahead-v3:1.2.9@aar/res/values/values.xml.

http://searchahead-public-api-b2c-staging.cloud.mapquest.com/search/v3/prediction The correct url, according to https://developer.mapquest.com/documentation/searchahead-api/get/ is: http://www.mapquestapi.com/search/v3/prediction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant