Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 124

Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
01/19/14 11:13 PM (11 years ago)

Context Menu on Menu Simple

Edit:v2 All is well. Close this issue. The reason that the context menu(3 dots/bars) is not showing in the phones is because they have hardware menu buttons. Pressing the hardware menu button brings up the context menu as expected. I was just thinking I would see the 3 dots/bars on the right side of the action bar as I do with the tablet. The tablet does not have a hardware menu button key, so as expected, the context menu shows in the action bar of the tablet and not in the phones. The great thing is.... They all function. Woo Hoo...... Whew. Learning. Also through help of Chris1, figured out how to implement the context menu on Buzztouch. Edit:v1. Found out that on my Samsung and on the smaller t-mobile I am not seeing the context menu at all. Same app is installed to the Samsung Note, T-Mobile Prism, and an HP touchpad running Android. The phones don't show the context menu, the tablet does, but as such, noted below. ------------------------------------------------------------------------------- Here is what I am finding. BTv3.0 Android 4.0 - Tablet Setup with no Tabs, standard simple menus. Json data looks good and validates. I have 3 items setup in the context menu Camera Setup Information Emergency I get the context menu for Android on the right side. I can click it and it drops down a box that has this in it. (looks nice) Refresh All Data Close Quit App They all work, as suggested(refresh,close, and quit), but that is not what I wanted. Hee hee. Wahhhhh! Huh! What? Json looks great, looks like this { "BT_appConfig":{ "BT_items":[ { "itemId":"JA712235E363F7E2DCE7328A1", "itemType":"BT_app", "buzztouchAppId":"JA712235E363F7E2DCE7328A1", "buzztouchAPIKey":"8723708536EF2327DB4E685", "dataURL":"https://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA712235E363F7E2DCE7328A1&apiKey=8723708536EF2327DB4E685&apiSecret=F4298CA10BCC6EC710B9F1C", "reportToCloudURL":"https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA712235E363F7E2DCE7328A1&apiKey=8723708536EF2327DB4E685&apiSecret=F4298CA10BCC6EC710B9F1C&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "registerForPushURL":"https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA712235E363F7E2DCE7328A1&apiKey=8723708536EF2327DB4E685&apiSecret=F4298CA10BCC6EC710B9F1C&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "lastModified":"Mon, 20 Jan 2014 01:46:01 -0800", "lastPublished":"Sat, 04 Jan 2014 20:04:37 -0800", "name":"Kid Locator 2", "version":"1.0", "currentMode":"Design", "startLocationUpdates":"0", "promptForPushNotifications":"0", "allowRotation":"largeDevicesOnly", "BT_themes":[ { "itemId":"50CEBCE1960C00F2BC16DE4", "itemType":"BT_theme", "backgroundColor":"#FFFFFF" } ], "BT_tabs":[ ], "BT_menus":[ { "itemId":"54E11868C1F758A1C71F9F1", "itemType":"BT_menu", "itemNickname":"InfoAndDisclaimer", "childItems":[ ] } ], "BT_screens":[ { "itemId":"5CEAF026F3D30721BAE063C", "itemType":"BT_screen_menuButtons", "itemNickname":"NEVER LOST", "navBarTitleText":"WELCOME TO - HERE I AM", "navBarBackgroundColor":"#FFFFFF", "navBarStyle":"solid", "contextMenuNickname":"InfoAndDisclaimer", "contextMenuItemId":"54E11868C1F758A1C71F9F1", "buttonLayoutStyle":"horizontalBottom", "buttonLabelLayoutStyle":"below", "preventAllScrolling":"1",....................... ~ ~ more screen stuff here, but not related to context menu ~ .................................................................. ~ ............................................................ { "itemId":"1C8B88CD63FAE935BC5FF57", "itemType":"BT_screen_wordDoc", "itemNickname":"information", "navBarTitleText":"information", "navBarBackgroundColor":"#FFFFFF", "navBarStyle":"solid", "backgroundColor":"#FFFFFF" }, { "itemId":"177D11E1E7898BC1439E402", "itemType":"BT_screen_menuListSimple", "itemNickname":"InfoAndDisclaimer", "navBarTitleText":"INFORMATION", "backgroundColor":"#FFFFFF", "backgroundImageNameSmallDevice":"nonblueframemusic.png", "backgroundImageNameLargeDevice":"nonblueframemusic.png", "backgroundImageScale":"fullScreen", "childItems":[ { "itemId":"21EDEA20D7B4DE47ED26732", "itemType":"BT_menuItem", "loadScreenWithItemId":"1C8B88CD63FAE935BC5FF57", "titleText":"CAMERA SETUP", "rowAccessoryType":"details" }, { "itemId":"621897199E4788AA5F1F289", "itemType":"BT_menuItem", "loadScreenWithItemId":"04CBAA7BCCAF680F0B3B0EC", "titleText":"APPLICATION USAGE" }, { "itemId":"B2EB1BF8EA01C18E28FCA49", "itemType":"BT_menuItem", "loadScreenWithItemId":"4CC4D0E3B987745BB97ABA4", "titleText":"EMERGENCY" } ] }, { "itemId":"04CBAA7BCCAF680F0B3B0EC", "itemType":"BT_screen_wordDoc", "itemNickname":"MomAndDad", "navBarTitleText":"MomAndDad" }, { "itemId":"4CC4D0E3B987745BB97ABA4", "itemType":"Email_image", "itemNickname":"emergency", "navBarTitleText":"emergency" } ] } ] } }
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/19/14 11:52 PM (11 years ago)
Not sure what's going on with the smaller devices. But for the context menu that you do see, I can see why you aren't seeing any menu items (other than the basic ones like refresh, close, quit). The JSON for your context menu has no child items: "BT_menus":[ { "itemId":"54E11868C1F758A1C71F9F1", "itemType":"BT_menu", "itemNickname":"InfoAndDisclaimer", "childItems":[ ] } ],
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/20/14 12:29 AM (11 years ago)
Yep. I have the same structure as Chris… "BT_menus": [ { "itemId": "33F1FF56C4CF54BD9C9D69B", "itemType": "BT_menu", "itemNickname": "AndroidContextMenu", "childItems": [ { "itemType": "BT_menuItem", "titleText": "Option 1", "loadScreenWithItemId": "4C9710F98C4C2A15878BE44" }, { "itemType": "BT_menuItem", "titleText": "Option 2", "loadScreenWithItemId": "6F02B4D304197A458750C4D" } ] } ], It looks like you created the menu, but didn't link any menu 'choices'. Cheers! -- Smug
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
01/20/14 09:24 AM (11 years ago)
Ah, but I did. And you can see. Buzztouch put those items at the end of the JSON under the bt_screens section and not under the bt_menus section. If you look at the last 6 sections above(right under the ...........), you see the menu simple and it's child items. I tried moving them to the bt_menus section and was able to get valid Jason formatting, but it never worked, and actually caused the app to stop. This was all auto generated by buzz touch. any ideas?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/20/14 10:19 AM (11 years ago)
Those look like screens, not menu items. Make sure you go to the "Menus" section on your app (see screenshot) and add a menu there, along with menu items. https://www.dropbox.com/s/4wgpy2pru63kb4l/Screen%20Shot%202014-01-20%20at%2010.16.44%20AM.png
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
01/20/14 10:38 AM (11 years ago)
OK. Maybe I don't understand how this is supposed to work. I couldn't find any documentation. But I do have it now. Had to click on the context menu I created to fill in. Thanks. Doh! Now, hmm. Not showing up on the phones, but is showing on the tablet.... Ah, progress though.... Thanks again.
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
01/20/14 10:46 AM (11 years ago)
much better.... Thanks Chris, very helpful. "BT_themes":[{"itemId":"50CEBCE1960C00F2BC16DE4", "itemType":"BT_theme", "backgroundColor":"#FFFFFF"} ], "BT_tabs":[ ], "BT_menus":[ {"itemId":"54E11868C1F758A1C71F9F1", "itemType":"BT_menu", "itemNickname":"InfoAndDisclaimer" , "childItems":[ {"itemType":"BT_menuItem", "titleText":"CAMERA SETUP", "loadScreenWithItemId":"1C8B88CD63FAE935BC5FF57"}, {"itemType":"BT_menuItem", "titleText":"MOM & DAD", "loadScreenWithItemId":"04CBAA7BCCAF680F0B3B0EC"} ]} ], "BT_screens":[{"itemId":"5CEAF026F3D30721BAE063C",
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
01/20/14 01:01 PM (11 years ago)
And I found this. Menus are a common user interface component in many types of applications. To provide a familiar and consistent user experience, you should use the Menu APIs to present user actions and other options in your activities. Beginning with Android 3.0 (API level 11), Android-powered devices are no longer required to provide a dedicated Menu button. With this change, Android apps should migrate away from a dependence on the traditional 6-item menu panel and instead provide an action bar to present common user actions. Although the design and user experience for some menu items have changed, the semantics to define a set of actions and options is still based on the Menu APIs. This guide shows how to create the three fundamental types of menus or action presentations on all versions of Android:
 

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.