AsyncTask compare 2 jsons

1

I'm trying to make it popular with my list view with a json, it checks the information of another json and returns me a link in which I'll use it to fill in photos, but everything happens right with you setar the link in a class but in the moment of receiving it always I get null

GET.class

asked by anonymous 11.08.2017 / 14:22

1 answer

1

You create the Task

 new fotolist(activity, lv, teste).execute("http://infasstec.com.br/desenvolvimento/android/foto.json");

But you are not using the result that is inside it.

Save to instance

fotos =  new fotolist(activity, lv, teste).execute("http://infasstec.com.br/desenvolvimento/android/foto.json");

And then on a button action for example you can get the link with     fotos.link

Another thing, you are setting the link inside a for, you will only have the last given when you use it, you may want to use a List instead of String

PS: Use CamelCase on behalf of classes.

    
11.08.2017 / 14:52