-
Notifications
You must be signed in to change notification settings - Fork 39
Push notification permission is always granted on Android #61
Comments
Hello, any idea for this issue? Thanks! |
@eexit are you seeing the same behaviour for Android 9 and Android 13? If I remember correctly on Android 9 push notification permission is granted on app installation. While on Android 13 it is similar to iOS permissions model when it should be requested. |
Correct, android permissions changed in Android 13 |
Hello, This is not about the device permission, this is about Intercom knowing about that permission. For Android 13, the device permission is not granted by default but yet the Intercom Carousel, somehow, thinks it is. On Android < 13, if you deny explicitly the permission, then launch the carousel, it will still show the permission as granted while it should not. This behavior works as expected on iOS. I'm not sure if this is the way this plugin is implemented or if this is the way Intercom interpret the “permission granting”. Thanks for your input! |
Hello, Has anyone confirmed this behavior? Thanks! |
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:
await Intercom.presentContent(IntercomContent.carouselWithCarouselId(copiedCarouselId));
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
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 toIntercomModule.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!
The text was updated successfully, but these errors were encountered: