Skip to content

Hey, in android 13 the notifications are shown, but they are not clickable #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
giannis21 opened this issue Feb 9, 2023 · 10 comments
Closed

Comments

@giannis21
Copy link

In order for the notifications to be clickable i must enable the option 'display over other apps' . When the app is debug mode this choice exists in app settings, but when i run the app in release mode, this choice does not exist. Any help?
Thanks in advance!

@seco35
Copy link

seco35 commented Feb 23, 2023

Could you provide more information? Such as your rn and react-native-notifications version and on what device you'd observed this behaviour.

It works for me with rn 0.71.2 and react-native-notifications ^4.3.2 on Samsung Galaxy A13 (Android 13 - API 33).

@b3itgustaf
Copy link

b3itgustaf commented Mar 1, 2023

I'm experiencing the same issue. Tapping a notification in the list of notifications, or on the lock screen, does nothing but discard the notification. I'm expecting the tap to open the application, as was the case with react-native-push-notifications-package.

Using:
react-native: 0.71.1
react-native-notifications: 4.3.3

I've set up everything according to the guide here.

Could this have anything to do with setting up a service and intent-filter in the androidmanifest, like described here?

@giannis21
Copy link
Author

giannis21 commented Mar 7, 2023

Guys in android 13 in some devices i need this permission in manifest (SYSTEM_ALERT_WINDOW)
This sometimes can either work if the user enables the option 'display over the other apps' in settings or it justs works without enabling anything in settings. Anyway by adding this i made it work

@b3itgustaf
Copy link

@giannis21 you should not need to request that permission, I believe the issue lies in trampoline restrictions introduced in Android 12, described here. In our app we absolutely cannot break the UX-flow by directing the users to the app-settings to manually enable the display over other apps-setting.

There's a pending PR for fixing this issue, but the code owners doesn't seem to have had time reviewing it: #920

@ovbm
Copy link

ovbm commented Mar 21, 2023

Guys in android 13 in some devices i need this permission in manifest (SYSTEM_ALERT_WINDOW)
This sometimes can either work if the user enables the option 'display over the other apps' in settings or it justs works without enabling anything in settings. Anyway by adding this i made it work

Adding <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> to AndroidManifest.xml and manually allowing "Display over other apps" on the device is the only way I've been able to make notifications actually open our app on Android 13. I have no idea how these two are related, will investigate further. For reference I'm running react-native-notifications-: 4.3.3 with #920 applied with patch-packages.

Anyone else facing this issue?

@arienemaiara
Copy link

Hey guys, I was facing the same problem and I could get it fixed with zo0r/react-native-push-notification#2352

@ovbm
Copy link

ovbm commented Apr 10, 2023

Thank you!
Replacing implementation 'com.google.firebase:firebase-core:16.0.0' with implementation "com.google.firebase:firebase-messaging:23.1.2" in android/build.gradle did the trick.

firebase-core is deprecated. Should the android installation documentation be updated?

@stale
Copy link

stale bot commented May 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the 🏚 stale label May 18, 2023
@stale
Copy link

stale bot commented Jun 9, 2023

The issue has been closed for inactivity.

@katwal-dipak
Copy link

katwal-dipak commented Mar 25, 2024

Adding dependency
implementation(platform("com.google.firebase:firebase-bom:32.8.0")) instead of
implementation 'com.google.firebase:firebase-core:x.x.x'
at android/build.gradle solved the issue in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants