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]: release 5.0.0 NotificationServiceExtension #913

Closed
1 task done
alextapia007 opened this issue Sep 12, 2023 · 2 comments
Closed
1 task done

[question]: release 5.0.0 NotificationServiceExtension #913

alextapia007 opened this issue Sep 12, 2023 · 2 comments

Comments

@alextapia007
Copy link

alextapia007 commented Sep 12, 2023

How can we help?

In NotificationServiceExtension

before public void remoteNotificationReceived(Context context, OSNotificationReceivedEvent notificationReceivedEvent) works
but now public void onNotificationReceived(INotificationReceivedEvent event) how do i get app context?

Code of Conduct

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

Hi @alextapia007 thank you for your patience!

The new Notification Service Extension documentation can be found here.

Let us know if you have any further questions or concerns!

@victorrgouvea
Copy link

Hi, I'm having this same issue using the new onNotificationReceived method in NotificationServiceExtension.

I was using the old version before (was named remoteNotificationReceived) and it had the context and notificationReceivedEvent as parameter, but the new version only has the event. In my implementation, I'm using the context to start a service in my app, but now I have no idea about how to get the current app context. The service is supposed to start with the app closed, so I can't get it from somewhere else in the app, it has to be from the INotificationServiceExtension class or the onNotificationReceived method.

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

3 participants