Skip to content
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

[question]: Provisional notifications and optIn/optOut #1502

Open
1 task done
yevgenPaykey opened this issue Oct 18, 2024 · 4 comments
Open
1 task done

[question]: Provisional notifications and optIn/optOut #1502

yevgenPaykey opened this issue Oct 18, 2024 · 4 comments

Comments

@yevgenPaykey
Copy link

yevgenPaykey commented Oct 18, 2024

How can we help?

I'd like to know what is the proper way to opt in/out when provisional push notifications are activated.
Once user opts out and then opts in user sees native push notification permission request which is not the good UX. I'd like user to remain on provisional permission after opting in.
I've tried to run optIn via rest api (to avoid having permission popup) but get an error:
{"errors":[{"code":"subscription-7","title":"Subscription can't be enabled due to an error reported by the SDK. Check notification_type value for a specific reason code"}]}%

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Oct 29, 2024

Hi @yevgenPaykey thanks for your question.

There is not a way to opt a user out and then opt back in provisionally.

Can you explain why the permission request is poor UX?

The user has chosen to opt out and then chosen to opt in again - I would expect a push permission prompt to be appropriate in this case.

@yevgenPaykey
Copy link
Author

hi @nan-li
Thanks for the reply.
I opt out user programmatically when user logs out. In this case I don't want user to receive push notification since there is no user at this moment. And then when user logs in again I programmatically opt user in and expect SDK to continue in provisional mode. I request full permission later on during "happy moment" when user performs app's main feature successfully. I don't want to request full permission upon logging in.
Hope this helped to understand the problem better

@nan-li
Copy link
Contributor

nan-li commented Dec 5, 2024

@yevgenPaykey I see, and you have notifications that are sent to ALL users?

The workaround is to send notifications to users by external ID only, which I don't know if that is feasible for you.

@yevgenPaykey
Copy link
Author

@nan-li yes the sending logic takes userId into account for sure. The problem in this scenario is more about user receiving full permission request alert upon login after logout.

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

2 participants