Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 9    Views: 187

RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
05/16/12 07:47 PM (13 years ago)

Possible to use JSON to create Menu Items?

Is it possible to use JSON in Data Feed URLs to create a large list of items in a Menu List? I'm trying to create a large call-tree, with a long list of menu items, that presents multiple phone numbers for each person. And I'm lazy, so would like to use something like the CSV to JSON tool from Stobe, but to use it to create a list menu.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
05/16/12 07:53 PM (13 years ago)
I can do that :) You just have to ask, lol!
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
05/16/12 08:14 PM (13 years ago)
I've bought your tool and am using it to convert over 600 map entries in a Google Spreadsheet into JSON, and hope to get it going soon. But the current question revolves around how to turn CSV entries into a JSON Data Feed, which can automagically create the screens needed for a large List Menu. I suspect the hard part is creating and managing the unique IDs for each list item in the menu. I think this would be a wonderful tool to create; I sure would buy it! The CSV would provide something like this: Jane, 919-123-4567, 919-234-1234, 919-252-3344 Jack, 919-123-4567, 919-234-1234, 919-252-3344 Bill, 919-123-4567, 919-234-1234, 919-252-3344 Darryl, 919-123-4567, 919-234-1234, 919-252-3344 Where your Parent Menu List would have items of: Jane Jack Bill Darryl And each of those would somehow link to the 3 phone numbers to dial for each person.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
05/16/12 08:19 PM (13 years ago)
ok, I think I see what you're looking for. Basically a big List menu, that leads to a 3 item list menu for each entry? Would it look something like: Jane -> Office, Cell, Home (with each of the menu items just having the text, but leading to the phone dialer with their number?) I can definitely put this type tool together.
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
05/16/12 08:34 PM (13 years ago)
You got it, thanks. I would think it could be used for multiple uses for things with with a parent/child relation.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
05/16/12 08:36 PM (13 years ago)
ok, send me a PM with your email address so I can get the specifics. I'll need to know exact wording on the menus, etc. to get started.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/16/12 08:57 PM (13 years ago)
Perhaps html might work better. You could have a search function with html. Fred
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
05/16/12 09:05 PM (13 years ago)
Android users and their search button! lol
 
Known
Apple Fan
Profile
Posts: 83
Reg: Jan 07, 2012
Suttons Bay, Mi...
830
like
05/16/12 10:17 PM (13 years ago)
I don't know if this will help, but about ten minutes ago I was reading the information contained within the Menu Simple plugin as used on the BT Server. Would this not also apply to what you're after? This plugin produces a simle menu in list format. It does not use a header or footer image and is perfect for sub-menus. The right-side details indicator for each row (arrow, details, none) is (arrow, details indicator, blank). There is no left-side icon or image, typical in plain menu's and other utility screens. The primary purpose of this plugin is to quickly and easily create a menu while avoiding the complexities introduced by many advanced settings. The items in the list can individually entered in the control panel or they may come from a remote file. If you're showing more than a dozen or so menu items it's usually best to pull them from a remote file. iOS Project ------------------------ 1 Objective-C class (a total of 2 files) are needed. BT_screen_menuListSimple.m and .h BT_screen_menuListSimple.m is the main UIViewController that shows the list. The UITableViewCell that is used for each row is created from one of the buzztouch core files, BT_cell_menuList.m, .h Android Project ------------------------ BT_screen_menuListSimple.java is the Activity class that displays the menu. The layout is handled by screen_menulistsimple.xml for the activity and men_list_rowsimple.xml for each individual row. JSON Data ------------------------ If you manually enter the menu item data, the JSON data for this item in the BT_config.txt includes a child items array holding individual BT_menuItem items. Each item produces a row. { "itemId":"1111", "itemType":"BT_screen_menuListSimple", "navBarTitleText":"My Simple Menu", "childItems":[ { "itemId":"menu_1", "itemType":"BT_menuItem", "titleText":"This is row 1", "loadScreenWithItemId":"1234" }, { "itemId":"menu_2", "itemType":"BT_menuItem", "titleText":"This is row two", "loadScreenWithItemId":"5678" } ] } If you provide menu item data from a remote file there is no childItems array in the screen definition in the BT_config.txt file. Instead, the menu items are pulled from a remote file. { "itemId":"1111", "itemType":"BT_screen_menuListSimple", "navBarTitleText":"My Simple Menu", "dataURL":"http://www.domain.com/theMenuItemData.php" } In this case the menu items would come from a backend script at the dataURL. Loading the dataURL in your browser would produce output like this.... { "childItems":[ { "itemId":"menu_1", "itemType":"BT_menuItem", "titleText":"This is row 1", "loadScreenWithItemId":"1234" }, { "itemId":"menu_2", "itemType":"BT_menuItem", "titleText":"This is row 2", "loadScreenWithItemId":"5678" }, { "itemId":"menu_3", "itemType":"BT_menuItem", "titleText":"This is row 3", "loadScreenWithItemId":"2948" } ] }
 
simon@TFA
Lost but trying
Profile
Posts: 1
Reg: Jan 26, 2012
Kilmarnock
2,160
like
05/19/12 06:22 AM (13 years ago)
Hi folks - post #1 from me, so be gentle ;-) I've thought about using HTML screens before for a "sub-category" display, but have been discouraged by the thought of trying to style the returned html. Does anyone have any tips or tricks that can be used to ensure that the returned data (e.g. an unordered list) would match the "parent" category screen? An example might be creating a list as I think RonBo has done using the simple menu list, which will in turn call a remote php file to generate the html output for a sub-category list. The issue for me would be in getting the generated html to have the same styling as the parent simple menu list. Any thoughts please?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.