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]: Updating from 3.x to 4.x RegisterForPushNotifications() method #337

Open
1 task done
MihaMarkic opened this issue Nov 4, 2022 · 2 comments
Open
1 task done

Comments

@MihaMarkic
Copy link

How can we help?

I'm updating to 4.x and wondering whether PromptForPushNotificationsWithUserResponse() is equivalent for old RegisterForPushNotifications(). Upgrade docs doesn't mention it.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@robfrancis
Copy link

@MihaMarkic

Did you find if this was true?

OneSignal.Current.RegisterForPushNotifications()
is now
var result = await OneSignal.Default.PromptForPushNotificationsWithUserResponse();

@MihaMarkic
Copy link
Author

@robfrancis I think so. And instead of using

OneSignal.Current.StartInit(...).HandleNotificationOpened(Globals.HandleNotificationOpened)

I'm using

OneSignal.Default.NotificationOpened += Globals.HandleNotificationOpened;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants