I have console application that was developed in salesforce classic UI. Now I want to support this application for salesforce lightning UI in Lightning console app.
there are some scripts that i want to add in my app based on theme selected. for that I am using, below script, i had written for Lightning Experience.
<apex:outputPanel rendered="{!$User.UITheme == 'Theme4d'}">
<script type="text/javascript" src="/support/api/38.0/lightning/opencti_min.js"></script>
<script src="/soap/ajax/38.0/connection.js"></script>
</apex:outputPanel>
and for salesforce classic i had return following script.
<apex:outputPanel rendered="{!$User.UITheme == 'Theme3'}">
<script src="/support/api/38.0/interaction.js"></script>
<script src="/support/console/38.0/integration.js"></script>
<script src="/soap/ajax/38.0/connection.js"></script>
</apex:outputPanel>
Issue is that $User.UITheme always retunrs Theme3 for both salesforce classic and salesforce Lightning Experience.
I am i missing any settings or what is wrong in this case ?
Any help or Workaround to this ?
I also tried with UserInfo.getUiTheme( ), it is also giving me Theme3 for both the experience.
currently I am using ap5 domain
https://ap5.lightning.force.com/one/one.app