-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Bug]: v5.0.1 Android - Push Notifications are not received after first app opening #1581
Comments
Update: Alternative described in So, it means, the issue is only in requesting permission not via |
Hi @fmorau, Thanks for the update to your question. That makes sense, the OneSignal SDK does not know when you request permissions outside of the SDK's methods, and won't read data until a new session. We are looking into this as a feature to support. |
Hello @nan-li, I hope you're doing well. I wanted to bring up an issue related to a functionality of this method and why I didn't use it. I've encountered a situation where after selecting the "Refuse" option for push notifications permission, P.S. I could solve it for now by using third party permission check method after Thank you for your attention to this matter. 🙏 |
@nan-li I could solve the main issue described above by requesting permission via
AR: No message is shown After the app is reopened, all notifications appear (even for the message sent at step 8) |
Hi @fmorau, I apologize for the delay and thank you for the details. I see there are 2 issues you are running into: Question 1:
Question 2:
You are calling
This is your own app settings page and how are you asking them to "Enable notifications"? Is it through a OneSignal method? Are there any calls to OneSignal in these steps?
The
Sorry I misunderstand this. You send a message to the user but it is not shown on their device? And on the next app open, this notification is show by the device? In the meantime, I think this is enough information for me to try and reproduce. |
Hello @nan-li ! No worries, and thank you for taking care of it 🙏
Actually, in our case it happens long time after opening the app. User goes through sign-in / sign-up process until this method would be called.
Yep, it is inside of our App. Whenever they want to enable/disable notifications we have specific "Settings" page for it. Whenever they try to turn it ON - we check programmatically if permission is granted on device level and if it is not - showing the modal (just react-native UI - not OneSignal method), which proposes to do it on device level first.
Yep, the subscription is triggered, when user returns back to the app, but
Oh, sorry, it's indeed might not be clear enough, |
Hi @fmorau, Sorry for the delay, I haven't been able to reproduce and then I was out of the office the previous week. Here are the steps I took. I built in debug mode using a Nexus S emulator on API 33. I do not have any 'settings' page within the app.
|
Does this issue happen consistently on every Android device you tested? |
Following up on the other problem you encountered with using When I call
I did not use other notification permission prompting methods. |
Hello @nan-li, Thank you for addressing this! In response to your comment:
I'd like to clarify the steps:
In essence, this means that the user triggers a Regarding the consistency of this issue on Android devices - it occurs consistently on every Android device we've tested. |
Hmm, ok maybe there is something strange with using Also I am curious what happens if you don't use ^ Are the correct observers triggered and behavior is correct? Or behavior is still wrong, and same as using Thank you for following up with your details all this time. It is appreciated. |
Hello, @nan-li! I've recently updated Looks like we can close the issue now, |
But looks like I faced another one, one lever higher: When I played further with turn on / off permissions and then open the app back to check if subscription and statuses are working well - it was indicating everything properly, |
Hi @fmorau,
Can you explain more details? In the app, it looks like the behavior is correct?... calling OneSignal methods like But in the OneSignal dashboard, you see the subscription with the "Permission Not Granted"? Can you reproduce your steps? |
@nan-li yep, exactly! |
@nan-li should I log it somewhere as separate Issue, or you have already initiated process on it from within OneSignal Team? |
I'm having
|
Hi @fmorau I am so sorry for the delay. I haven't been able to reproduce your new issue yet with toggling permission on and off outside of the application. Do you happen to have logs to share? The Dashboard will show "Permission Not Grated" after the SDK tells the server that there is no permission. That means somehow, the SDK sent a request to the server with that information. All requests should be logged. |
Hi @nusendra, Sorry for the confusion.. The You can use the push subscription observer to be notified when it is retrieved. See usage for Push Subscription Observer in the migration guide here. |
I see, thanks. i will update my code later. Currently im using this solution #1616 |
I see, also apologies I did not write my response correctly. I just updated my comment to use the correct link @nusendra |
i believe i did that way before, but somehow it didn't work. But thanks, i'll try again. Maybe im missing something |
What happened?
Hello
react-native-onesignal
team,I recently updated to v5.0.1 and experiencing an issue on Android where Push Notifications are not coming after first app opening.
Whenever I collapse and expand the app - it starts coming.
I couldn't find any workaround to impact this behavior and enable notifications straight away, so I report it here. Any help or guidance would be greatly appreciated.
Thank you!
Steps to reproduce?
What did you expect to happen?
I expected that after updating to react-native-onesignal v5, push notifications on Android would continue to work as they did before the update.
React Native OneSignal SDK version
5.0.1
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: