The Utility Bar sits in the footer of the screen and provides an extensive set of APIs. To use the Utility Bar, the Lightning Component needs to use a special component named Lightning :utilityBarAPI. The following code shows a sample component code snippet that uses this API component:
<aura:component implements="flexipage:availableForAllPageTypes" access="global" > <Lightning :utilityBarAPI aura:id="utilitybar" /> <Lightning :button label="Get All Utility Info" onclick="{! c.getAllUtilityInfo }" /></aura:component>
The controller code that can call all the functions is as follows:
({ getAllUtilityInfo : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.getAllUtilityInfo().then(function(response) ...