-
Notifications
You must be signed in to change notification settings - Fork 61
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]: com.onesignal.OneSignal$PromptForPushNotificationPermissionResponseHandler.response #606
Comments
Just to clarify, is your issue that the app crashes after calling What devices is the issue occurring on and what version of Android are they on? Could you try reproducing the issue and provide the steps when you are able to |
I don't know what happened, as I see it is connected to the "PromptForPushNotificationPermissionResponseHandler" and probably somehow connected to the Unity 2021.3.25, but I'm not sure. |
@shepherd-l should PromptForPushNotificationsWithUserResponse() should be called everytime and SDK checks if the popup should be shown? Or there is some code logic to check if we need to ask for prompt? |
We recommend following our guide on how to prompt the user for push permission Let us know if you have any questions! |
@shepherd-l thank you for you answer. Based on your links and the one above the code should look like this: Am I right? |
I believe in Unity it would look something like this:
You can see Push Notification Properties code samples here and the types of Notification Permission Statuses here Sorry for the confusion. That guide code example is specifically for Android. Thanks for bringing it up, we could update our docs to include code samples for our other SDKs. |
@shepherd-l your code gives alert: Because this call is not awaited, execution of the current method continues before the call is completed.
|
Yes sorry, I forgot to include
For example :
You can also see our included example MonoBehaviour for some sample usage Our migration guide also includes some 3.x.x code samples |
everything is now messed up |
We have had no further reports of this. Please upgrade the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information. @rakshitbharat |
What happened?
Can't reproduce the issue on my device. It started to happen after I switched from unity 2020 to unity 2021.
Steps to reproduce?
What did you expect to happen?
I expected to see allow notification popup probably.
Unity version
2021.3.25 (latest)
OneSignal Unity SDK version
3.0.11
Platform
Android
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: