I have an appexchange application which is going to be installed in customer orgs. I need to show a sidebar component if the app selected from app menu is my installed package. When I change the app menu from the installed package to something else I need to hide the side bar component. I know this can be done by javascript depending on the DOM structure of salesforce app menu but it is dangerous as Salesforce can change at any time. So please let me know is there any work around to detect the salesforce active app / change in active app.
Best Answer
You can use the describeTabs method to list the current applications and determine if the selected app is the one your looking for. I created a HTML side bar component with an IFRAME containing this page, when i switch applications it updates with accordingly.
The following displays the message accordingly..