ListPicker with an API

53 views
Skip to first unread message

sschucktown

unread,
Jun 6, 2015, 10:29:44 AM6/6/15
to mitappinv...@googlegroups.com
Hey Guys,

I have an API/listPicker problem.  I have a Google Custom search engine and when I query the Api it returns 10 results.  I have a function in AI2 set up to parse the JSON and return it to a list view.  I am using the (I'd paste the blocks but I am not in front of my computer ATM)  listview.elemensFromSring->join->select list item list->select list item list->etc....
type of set up to find only the url of each result in the list of lists from JSON.  It is working fine except it posts them all as a single list item in the ListView class.  I want to parse them to a "ListPicker" class where each URL is its' own select able item.  

I don't know if i can do that with the multiple index approach via http://www.newthinktank.com/2014/02/android-development-beginners-10/weatherapp3blocks/

I've tried both but can't seem to get it to parse into either the listview or listpicker.  Let me know what you all think.  Thank you

Taifun

unread,
Jun 6, 2015, 10:34:55 AM6/6/15
to mitappinv...@googlegroups.com
I would use the lookup in pairs block, see also this example
https://groups.google.com/d/msg/mitappinventortest/OGSe2a3X0fk/sVL8Adh1MHkJ

you might want to provide an example JSON result, so we can better understand, what you are talking about 

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         



sschucktown

unread,
Jun 6, 2015, 12:54:08 PM6/6/15
to mitappinv...@googlegroups.com
Thanks Taifun.  That is getting me a little closer I think.  Also, what is the easiest way to post the blocks.  I have a very long block that I would like to post but it wont all fit into a screen shot.

Taifun

unread,
Jun 6, 2015, 2:19:21 PM6/6/15
to mitappinv...@googlegroups.com
just post the relavant part 
and if you are talking about the JSON result, please post it as text into the thread
Taifun
Reply all
Reply to author
Forward
0 new messages