How to link a custom menu to a custom button in drupalgap?
When put in the header or footer block, just give the page id the block name. Here is the code:

/**
 * Implements hook_block_info().
 */
function footer_intrfc_block_info() {
  var blocks = {};
  blocks['footer_intrfc_block'] = {
    delta: 'footer_intrfc_block',
    module: 'footer_intrfc'
  };
  return blocks;
}

/**
 * Implements hook_block_view().
 */
function footer_intrfc_block_view(delta, region) {

var html = '&lt;div&gt;';
var btn_setup = theme('popup', {
            content: theme('jqm_item_list', {
                items: [
                  l('View profile', 'user'),
                  l('Login', 'user/login'),
                  l('Logout', 'user/logout')
                ]
            }),
            attributes: {
               id: drupalgap_get_page_id() + '_footer_intrfc_block'
            },
            button_text: 'Setup',
            button_attributes: {
              'data-icon': 'gear'
            }
        });
html += btn_setup + '&lt;/div&gt;';
return html
}