Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Push notification permission is always granted on Android #61

@eexit

Description

@eexit

Hello,

Firstly, thank you for your plugin. Very useful.

However, I would like to report something broken. I'm not React Native expert but according to Intercom documentation, some carousels can trigger for device permission. Which is great and offload all the permission request logic to the Intercom code.

For the push notification permission, I noticed that the carousel is always considering that the permission is granted on Android.

Steps to reproduce:

  1. Create an Intercom carousel with "Push notification" for the Button Action
  2. Set it live and copy its ID
  3. In the App, do an Intercom login and trigger a await Intercom.presentContent(IntercomContent.carouselWithCarouselId(copiedCarouselId));
  4. The carousel launches as expected
  5. The "Button Action" is filled with a tick icon instead of displaying 2 buttons (meaning the permission is already granted)

Doc: https://www.intercom.com/help/en/articles/4164612-design-and-build-a-mobile-carousel#things-to-note-about-requesting-device-permissions

Tested with:

  • @intercom/intercom-react-native@^4.0.1
  • config-plugin-react-native-intercom@main
  • expo@~48.0.6
  • Android 9 & 13

After some digging, the issue seems to be related to the MainNotificationService being injected to the Android source code. I believe this service is required to receive notifications but I suspect the call to IntercomModule.sendTokenToIntercom(getApplication(), refreshedToken) to register the device Intercom and flag the device has "granted for push notifications" while it's not the case.

Is there any chance we could sort this out so we could leverale this Intercom feature?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions