-
Notifications
You must be signed in to change notification settings - Fork 376
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
onOpened and onReceive not firing #606
Comments
+1 |
I have to go back to |
@pacozaa Did going back to After doing more research I've found that if the initial notification happens from when the app is totally shut down, any notifications received when the app is minimized cause the handlers to fire. But if I start the app, minimize without receiving a notification, the handlers are not fired when a notification comes in |
@burdell I followed your steps to reproduce, but it works for me every time. Are you certain you tested on 3.2.6...? How do you know these handlers are not firing? Can you test out our demo project with 3.2.6 and tell me if the issue occurs? |
@burdell yes it is. |
@Nightsd01 how do you run the demo project? |
@pacozaa It's in the Once that's done, you should be able to just replace with your App ID in Please let me know if you can reproduce this issue in our demo project or not - as of now I have not been able to reproduce this and 99% of the time it is user error - but it's possible it's a bug that only effects certain versions/devices as well. |
Sorry, been away from this for a few weeks but I was able to verify that it was working in the demo app Couldn't ever get it to work in our app though even after going through and trying to copy how the demo app was setup 🤷♂️ |
I'm seeing different, but related behavior to what's described here on Android ( On iOS, all of 1, 2, and 3 work correctly. I am able to reproduce this behavior in the demo app on |
I was experiencing the same issue as @burdell, but I managed to solve it. On iOS, everything worked flawlessly. But OnOpened wouldn’t fire on Android if the app was in inactive (background or killed). I’ve experienced that it usually fires once every session, but once it’s put in the background again, and tap on a new notification, it just shows the app. What I found weird is that there are two instances of my application after I tapped on the notification.
I suspected this behaviour could be the root of the issue, and all I had to do to fix this is to modify the AndroidManifest.xml from: <activity
android:name=".MainActivity”
android:launchMode=“singleTop”
> to:
After this, everything works perfectly on Android. I’m not sure why the example uses singleTop. What I did:
I'm using: |
@mcmar Some android device makers will not allow your app to execute 9/10 times when a user reports this issue it is because they have a bug in their code inside of the callback, or it's because of their launchmode/view hierarchy has an issue. We have not seen a user that has been able to reproduce in our example project. When you reproduce in our example project, can you please zip up the project exactly as it was when you reproduced and post a link here? Can you also post more information such as a logcat when you open the notification for the first 15 seconds? Can you also tell us what version/s of android you are able to reproduce this issue on? |
I've found how to solve this problem. Just delete 2 lines below : @OverRide I have compared the previous version with the current version and viola! that's where the main problem is. |
I also have the same problem. @Nightsd01 would you have any idea why this might happen? Thanks |
This did not work for me. |
Hi all, I am having a similar issue. On both iOS and Android, when I receive a push notification, I click on the notification and it opens the app. I created a code that when the app opens and it checks if there is a push notification, then opens a different screen to display the notification. Now the issue is, that the first time when I click on the notification the app opens, but nothing happens after that. Then closing the app, reopen it and suddenly the screen appears with the notification text shown. So is the onOpened function not working the first time? This happens on iOS and Android. |
@meetyourdev @udarts , |
Any answers to the problem? |
This still happens. Any solution? |
OnReceived is still not firing when app is background. Any solution? |
Howdy, |
@rgomezp I’m sorry. This does not happen always but when several notifications come to the mobile or when app was in background for few hours this happens. On both iOS and Android. This doesn’t happen always but regularly. |
@samitha9125 , @mauricioalexandres , |
@rgomezp Oh thank you for that. I didn’t see that earlier. So how can I get incoming notifications when my app is in the background? |
Howdy, Enjoy! |
Hello.. i know this is an old issue but can you guide me? I already created an incoming call screen but the problem is that the incoming call screen wont display when the app is inactive.. so is there other way to display it even it is inactive? |
Description:
I've upgraded from 3.2.5 to 3.2.6 which resolved #583, but still can't get the onReceived and onOpened functions to fire when app is minimized. The functions do fire if app is completely shut down. Confirmed its working on iOS.
I've tried
yarn remove
/yarn add
andreact-native unlink
/react-native link
but still not seeing it workingEnvironment
Steps to Reproduce Issue:
The text was updated successfully, but these errors were encountered: