Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 84

daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
10/25/12 05:13 AM (13 years ago)

How to use JSON Snippet Keeper

I am using self-hosted server. Now i have purchase "JSON Snippet Keeper" this plugin. And also i had watch plugin intro video, but i am unable to add my json data and use to other apps. Below is whole config data. {"BT_appConfig": { "BT_items":[ {"itemId":"EAE746BFE18B59A076966FCD6", "itemType":"BT_app", "buzztouchAppId":"EAE746BFE18B59A076966FCD6", "buzztouchAPIKey":"8A35241B0CE4B70AE45CE66", "dataURL":"http://app.xxxx.com/BT-server/api/app/?command=getAppData&appGuid=EAE746BFE18B59A076966FCD6&apiKey=8A35241B0CE4B70AE45CE66&apiSecret=FD425442D28C39095540B97", "reportToCloudURL":"http://app.xxxx.com/BT-server/api/app/?command=reportToCloud&appGuid=EAE746BFE18B59A076966FCD6&apiKey=8A35241B0CE4B70AE45CE66&apiSecret=FD425442D28C39095540B97&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "name":"JSON Test", "version":"2.0", "startLocationUpdates":"0", "allowRotation":"largeDevicesOnly", "BT_themes":[{"backgroundColor":"#FFFFFF"} ], "BT_tabs":[{"itemId":"CBECF61C4C30D1F8131E217", "itemType":"BT_tab", "textLabel":"More", "iconName":"blank.png", "soundEffectFileName":"", "homeScreenItemId":"2134075F06D2BCC47D8F71B"}, {"itemId":"25DF0241DB84E1DC7761129", "itemType":"BT_tab", "textLabel":"Design Menu", "iconName":"blank.png", "soundEffectFileName":"", "homeScreenItemId":"40CD91D4060C40CAEDA0255"} ], "BT_screens":[{"itemId":"F4B52AD9E8F6BF8698843CF", "itemType":"BT_sendEmail", "itemNickname":"Email Us", "emailSubject":"question about your app...", "emailToAddress":"[email protected]"}, {"itemId":"D82E299A1B7A4BA7A39BB34", "itemType":"BT_screen_customURL", "itemNickname":"Mortgage Calculator", "navBarTitleText":"Mortgage Calculator", "dataURL":"http://www.google.com"}, {"itemId":"78A334CA0CCC8C9A0761C25", "itemType":"BT_placeCall", "itemNickname":"Call Us", "number":"888-123-1234"}, {"itemId":"2134075F06D2BCC47D8F71B", "itemType":"BT_screen_menuListSimpleAdvanced", "itemNickname":"More", "navBarTitleText":"More", "navBarRightButtonType":"refresh", "navBarRightButtonTapLoadScreenNickname":"More", "navBarRightButtonTapLoadScreenItemId":"2134075F06D2BCC47D8F71B", "listRowBackgroundColor":"#FFFFFF", "listStyle":"round", "listRowSelectionStyle":"none", "childItems":[{"itemId":"56A75E1CBBADEED024D7CD5", "itemType":"BT_menuItem", "loadScreenWithItemId":"78A334CA0CCC8C9A0761C25","titleText":"Call Us"}, {"itemId":"51EEF179BE5A72C50953672", "itemType":"BT_menuItem", "loadScreenWithItemId":"F4B52AD9E8F6BF8698843CF","titleText":"Email Us"}, {"itemId":"77193171CB06A90EBA18FAC", "itemType":"BT_menuItem", "loadScreenWithItemId":"D82E299A1B7A4BA7A39BB34","titleText":"Mortgage Calculator"}]} ] } ] } } Kindly suggest how i use this data for creating duplicate apps.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
10/25/12 05:54 AM (13 years ago)
It really depends on what part of the apps you want to duplicate. Looking at the above config, it doesn't look like an overly complex project. (One menu with 3 screens?) If that's the case, you should be able to copy everything inside the BT_screens brackets: "BT_screens":[ ...copy all this... ] And put that in a single snippet, and delete your other screens from you new app (delete the menu-simple home screen). You might have to play around with the itemId of the snippet, depending on how you setup the "layout". Let me know if that helps, I'll be happy to help you further once I know more about what you're trying to accomplish. (and thanks for the purchase!) -Chris
 
daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
like
10/25/12 08:01 AM (13 years ago)
Dear Stobe, Thank you for your update. Now i have created new json but it wont work. My data is, {"itemId":"F4B52AD9E8F6BF8698843CF", "itemType":"BT_sendEmail", "itemNickname":"Email Us", "emailSubject":"question about your app...", "emailToAddress":"[email protected]"}, {"itemId":"D82E299A1B7A4BA7A39BB34", "itemType":"BT_screen_customURL", "itemNickname":"Mortgage Calculator", "navBarTitleText":"Mortgage Calculator", "dataURL":"http://www.google.com"}, {"itemId":"78A334CA0CCC8C9A0761C25", "itemType":"BT_placeCall", "itemNickname":"Call Us", "number":"888-123-1234"} Whats the wrong with this code?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
10/25/12 08:22 AM (13 years ago)
It's not so much "what's wrong with the code". Its probably a matter of how you want to use it. A snippet does nothing until its called upon by another screen, etc. What you have above are three screens being created in JSON (being held in a snippet, I imagine). Now you have to access them somehow. The list menu you had in your original post can point to them, but it just depends on how you do it. In my video, I showed how you could use a dataURL in your list menu to build the rows for the list. Is that what you plan to do?
 

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.