Skip to main content
Answered

Issue with Android and IOS styles using @capacitor-community/intercom

  • 22 January 2025
  • 1 reply
  • 65 views

Currently on our company we are trying to implement the intercom messenger on our Ionic Capacitor Angular project, so for that we are using the @capacitor-community/intercom plugin.

 

Issues

  • After clicking on the intercom messenger the wrong styles are being applied for android and ios.

 

Questions

  • Can it be some configuration missing inside intercom dashboard ?
  • Can the plugin be out of date ?
  • Is there an way of fixing this ?

 

Inside our intercom dashboard we have styles for web messenger and for our apps and for some reason in our app projects it keeps going for the web default styles.

 

Notes

  • When creating the styles we ensured that we are using the correct package name (com.companyname.appname) this is what we have inside capacitor config file and config.xml
  • The unexpected behaviour screenshot is what we currently see (web styles).
  • The expected behaviour screenshot is what we want to have (mobile sdk styles).
  • Keys where checked already and ensured that the right ones are being used.

 

Unexpected Behaviour

 

Expected Behaviour

 

Best answer by Emilygav

Hey there ​@Alexandre Hutsulyak, Emily here from Support Engineering 👋🏼

I can see that you opened up a conversation regarding this with Daniel which has since been resolved, nice!

For anyone else having this issue,  we don't have official support for the Capacitor plugin, the  @capacitor-community/intercom plugin is a 3rd party plug in we don't provide official support for. So unfortunately this would mean we would have no context around the styling of plugin.

But as this user was using Ionic (which we again don’t officially support), Intercom may work with both Ionic 1 & 2.

To use the Intercom with Ionic, run the following:


cordova plugin add cordova-plugin-intercom

Make sure you initialize Intercom correctly.
Ionic 1
For Ionic 1 you can use Intercom like this:


.run(function($ionicPlatform) {

$ionicPlatform.ready(function() {

cordova.plugins.intercom.registerIdentifiedUser({userId: "123456"});

cordova.plugins.intercom.setLauncherVisibility('VISIBLE');

});

})
 

Ionic 2
For Ionic 2 you need to add the folling variable to your app.component.ts:


declare var cordova:any;

You can then use Intercom like this:


this.platform.ready().then(() => {

cordova.plugins.intercom.registerIdentifiedUser({userId: "12345"});

cordova.plugins.intercom.setLauncherVisibility('VISIBLE');

});
 

However it is to be kept in mind that this method of installation is not officially supported, however it worked for this user to fix their issue 😀

View original
Did this topic help you find an answer to your question?

1 reply

Emilygav
Intercom Team
Forum|alt.badge.img+3
  • Intercom Team
  • 75 replies
  • Answer
  • January 31, 2025

Hey there ​@Alexandre Hutsulyak, Emily here from Support Engineering 👋🏼

I can see that you opened up a conversation regarding this with Daniel which has since been resolved, nice!

For anyone else having this issue,  we don't have official support for the Capacitor plugin, the  @capacitor-community/intercom plugin is a 3rd party plug in we don't provide official support for. So unfortunately this would mean we would have no context around the styling of plugin.

But as this user was using Ionic (which we again don’t officially support), Intercom may work with both Ionic 1 & 2.

To use the Intercom with Ionic, run the following:


cordova plugin add cordova-plugin-intercom

Make sure you initialize Intercom correctly.
Ionic 1
For Ionic 1 you can use Intercom like this:


.run(function($ionicPlatform) {

$ionicPlatform.ready(function() {

cordova.plugins.intercom.registerIdentifiedUser({userId: "123456"});

cordova.plugins.intercom.setLauncherVisibility('VISIBLE');

});

})
 

Ionic 2
For Ionic 2 you need to add the folling variable to your app.component.ts:


declare var cordova:any;

You can then use Intercom like this:


this.platform.ready().then(() => {

cordova.plugins.intercom.registerIdentifiedUser({userId: "12345"});

cordova.plugins.intercom.setLauncherVisibility('VISIBLE');

});
 

However it is to be kept in mind that this method of installation is not officially supported, however it worked for this user to fix their issue 😀


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings