tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
405 stars 279 forks source link

displayHelpCenter doesn't work every time #335

Closed nikitawolfik closed 2 years ago

nikitawolfik commented 4 years ago

React-Native: 0.59.10 react-native-intercom: 13.1.0

Implementation:

import Intercom from 'react-native-intercom';

...

onPress={Intercom.displayHelpCenter}

Help Center is enabled in Intercom configs. It works very well on iOS, but only works every other time on Android. Has been tested on multiple devices and simulators both in debug and release modes.

In the meantime, the promise that is returned by Intercom.displayHelpCenter does resolve, so that is not a rejected promise issue.

nikitawolfik commented 4 years ago

This appears to have been fixed by calling Intercom.registerUnidentifiedUser() as app mounts. Apparently, android wouldn't open the help center to an unregistered user.

nikitawolfik commented 4 years ago

Actually, my solution is a pain in the ass, so the issue stands.

Apparently, though, it's only android that doesn't trigger the displayHelpCenter method to unregistered users. Is there a way to fix this?

jefflewis commented 4 years ago

I'm running into this as well. Did you find if this is a limitation of the Intercom sdk or how it's being used in this library?

nikitawolfik commented 4 years ago

@jefflewis no, I actually just let it go since registerUnidentifiedUser seemed to fix the issue and my team and I didn't care enough to fully investigate this. Though this is just a workaround and I'll try to fix this either if this issue gets addressed and fixed or when I have more spare time on the project