question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening app from remote notification is blocked on Android 12 targetSdk=31

See original GitHub issue

Bug

Everything is working as expected on iOS and Android 6 to 11. For Android 12 (targetSdk=31) the notification is received if the app is in foreground. If the app is in background, the notification is displayed in notification center, but when i tap on the notification the app is not opened. I can see in the logs that it’s blocked due to the trampoline

E/NotificationService: Indirect notification activity start (trampoline) from my.app.dev blocked

Should this issue be already fixed with this PR?

Environment info

Android: 12 TargetSdk: 31 Library version: 8.1.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

6reactions
Vi-dotcommented, Oct 17, 2022

You can set the version used by react-native-push-notification directly like this : in android/gradle.properties

firebaseMessagingVersion=23.0.5
1reaction
bekatdcommented, Jun 28, 2022

Hi, does anyone find solution different than modifying build.gradle file as stated above?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Behavior changes: Apps targeting Android 12
For apps targeting Android 12, notifications with custom content views will no longer use the full notification area; instead, the system applies a...
Read more >
Tapping notification does not launch the app on Android 12
Setup an Android project with targetSdkVersion 31 · In the same project, include version v8. · Compile the app in Android Studio and...
Read more >
Android 13 Push Notification Developer Update Guide
Push Permission Behaviors · If a user has already granted permission on an older Android OS (12-), they will not be prompted again....
Read more >
Android 12 - Developer Guide - MoEngage
If your application targetSdkVersion is 31 and not updated to the latest version of MoEngage SDK (11.4.00or later), push notifications would not be ......
Read more >
Start activity from IntentService does not work in Android 12
Have your notification launch the activity directly. "Trampolines" like this are banned once your targetSdkVersion reaches 31 or higher.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found