Issue Integrating Intercom with React Native Android App | Community
Skip to main content
Answered

Issue Integrating Intercom with React Native Android App

  • May 19, 2025
  • 1 reply
  • 169 views

I'm currently integrating Intercom into my React Native Android Expo app and running into some build issues that I haven't been able to resolve. I’ve followed the official setup guide and installed @intercom/intercom-react-native, but the build fails when running the Android version of the app.

Details:

  • React Native version: 0.74.5
     
  • Intercom SDK version: @intercom/intercom-react-native@8.3.0"
  •  
  • Java version: Java 17 on M1 Mac
     
  • Error message: TypeError: null is not an object (evaluating 'IntercomEventEmitter.UNREAD_COUNT_CHANGE_NOTIFICATION')

Best answer by Emilygav

Hey ​@allanokothdev, Emily here from Support Engineernig at Intercom 👋🏼

 

You are seeing the error TypeError: null is not an object (evaluating 'IntercomEventEmitter.UNREAD_COUNT_CHANGE_NOTIFICATION') because you are likely referencing an internal or non-public API. The recommended way to track unread message count changes in Intercom's React Native SDK is:

  • Use Intercom.getUnreadConversationCount() to fetch the current unread count.
  • Listen for updates using the public event IntercomEvents.IntercomUnreadCountDidChange, not IntercomEventEmitter.UNREAD_COUNT_CHANGE_NOTIFICATION.

Example usage:

useEffect(() => {  const countListener = Intercom.addEventListener(    IntercomEvents.IntercomUnreadCountDidChange,    (response) => { setCount(response.count as number); }  );  return () => { countListener.remove(); };}, []);

This approach is documented and supported. If you are using Expo, ensure you are not running in Expo Go, as custom native modules like Intercom require a custom dev client or EAS build. 

 

It would also be recommended to use the latest version of the React Native module which you can find here 👈🏼

1 reply

Emilygav
Intercom Team
Forum|alt.badge.img+6
  • Intercom Team
  • Answer
  • June 13, 2025

Hey ​@allanokothdev, Emily here from Support Engineernig at Intercom 👋🏼

 

You are seeing the error TypeError: null is not an object (evaluating 'IntercomEventEmitter.UNREAD_COUNT_CHANGE_NOTIFICATION') because you are likely referencing an internal or non-public API. The recommended way to track unread message count changes in Intercom's React Native SDK is:

  • Use Intercom.getUnreadConversationCount() to fetch the current unread count.
  • Listen for updates using the public event IntercomEvents.IntercomUnreadCountDidChange, not IntercomEventEmitter.UNREAD_COUNT_CHANGE_NOTIFICATION.

Example usage:

useEffect(() => {  const countListener = Intercom.addEventListener(    IntercomEvents.IntercomUnreadCountDidChange,    (response) => { setCount(response.count as number); }  );  return () => { countListener.remove(); };}, []);

This approach is documented and supported. If you are using Expo, ensure you are not running in Expo Go, as custom native modules like Intercom require a custom dev client or EAS build. 

 

It would also be recommended to use the latest version of the React Native module which you can find here 👈🏼