0
I picked up a design from a Listrview’s website Android Hive
On this site he makes a query on the parse server and returns the list. I did the same thing in mine but using my server parse. It does the query but does not show the data on the screen. I tried to access via browser and shows the following message:
{"error":""}
I know this has to do with authentication. But I took the same code from the site and there is no key api Rest. I can’t understand how his goes and mine doesn’t. If I change the link and put his works normally.
In the example code, to do the search it only uses this:
// Movies json url
private static final String url = "http://api.androidhive.info/json/movies.json";
Here it is working, the entire JSON appeared when I saw it in the browser. You can add the method you are using to call the API?
– leofontes
@leofontes I think you confused. What appears in your browser is the android Hive address. I try to do the same thing and there’s this mistake I put up there.
– Artur Mafezzoli Júnior
It’s not the address, a JSON array appears with the content I believe is what you’re trying to consume in your application: [{ "title": "Dawn of the Planet of the Apes", "image": "http://api.androidhive.info/json/movies/1.jpg", "rating": 8.3, "releaseYear": 2014, "Genre": ["Action", "Drama", "Sci-Fi"] }, etc
– leofontes
So that’s right. Now moving on to mine it gives this error there. I’m sure it’s access. But I don’t know how to change
– Artur Mafezzoli Júnior
You gave permission to access the internet in your manifest?
– leofontes
Yeah. It’s all right there.
– Artur Mafezzoli Júnior
Let’s go continue this discussion in chat.
– leofontes
I was able to solve it with the @leofontes tip. In the example I was trying to get, it’s not retrofit but a json web page already created. Thank you.
– Artur Mafezzoli Júnior