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

Support Web Push Notifications by Apple #1537

Closed
githubkoma opened this issue Apr 26, 2023 · 8 comments
Closed

Support Web Push Notifications by Apple #1537

githubkoma opened this issue Apr 26, 2023 · 8 comments

Comments

@githubkoma
Copy link

githubkoma commented Apr 26, 2023

Dear Nextcloudians,

with iOS 16.4 Apple finally implemented Web Push Notifications (years and years after Android, regarding to mobile......)

Do you already support it, or is it on the roadmap? It would be just awesome and it would instantly enhance many of the Plugins that exist for Nextcloud

Looks like it needs to be implemented either on each Server, or at a Server on your Side, please see:

image

(i think the part of requesting Permissions links to here: NotificationsApp.vue
window.Notification.requestPermission() ... but where is the service worker, that could consume the received notification..)

best regards,
ghk

@solracsf solracsf changed the title Do you already support Web Push Notifications by Apple? Support Web Push Notifications by Apple Apr 26, 2023
@szaimen szaimen transferred this issue from nextcloud/server Apr 29, 2023
@nickvergessen
Copy link
Member

This is not on our roadmap in the foreseeable future. We have desktop client and mobile apps already which you can use to get notifications.

@githubkoma
Copy link
Author

@nickvergessen Oh ok, i understand.. i would love that feature for a plugin to notify users that dont use talk or the files app

Could you or someone point me to the correct files that should be involved? that would be great

  • Client
  • Server
    • notification route to receive the subscription
    • Service/Controller that already communicates to Pushservers
    • ...

i am thankful for any hint,
thanks in advance,
ghk

@nickvergessen
Copy link
Member

NotificationsApp.vue ?

I guess so

Where is the Serviceworker that could consume the Notification?

We don't have a Service worker

notification route to receive the subscription

What subscription?

Service/Controller that already communicates to Pushservers

https://github.com/nextcloud/notifications/blob/master/lib/Push.php

@githubkoma
Copy link
Author

Service/Controller that already communicates to Pushservers

https://github.com/nextcloud/notifications/blob/master/lib/Push.php

thank you!

Where is the Serviceworker that could consume the Notification?

We don't have a Service worker

Oh, i thought so, because you can install Nextcloud as a PWA, i thought in that case a ServiceWorker is needed to be registered in some Manifest File

notification route to receive the subscription

What subscription?

The Client "subscribes" to the WebPush Notification Service as mentioned here: https://web.dev/push-notifications-subscribing-a-user/#what-is-a-pushsubscription

@nickvergessen
Copy link
Member

Oh, i thought so, because you can install Nextcloud as a PWA, i thought in that case a ServiceWorker is needed to be registered in some Manifest File

Not sure what PWA is, but no the notifications app is not providing a manifest or anything anywhere.

The Client "subscribes" to the WebPush Notification Service as mentioned here: https://web.dev/push-notifications-subscribing-a-user/#what-is-a-pushsubscription

Yeah, but as said we don't need or want this ourselves at the moment. We have various client available and otherwise you need to have a tab of Nextcloud open in your browser to receive notifications.

@githubkoma
Copy link
Author

We have various client available and otherwise you need to have a tab of Nextcloud open in your browser to receive notifications.

This is the advantage of mozillas standardized web push notification approach, and in mozillas/apples case: You don't have to have any browser open, the push notification is triggered by their push notification servers directly to the mobile devices operating system

Yeah, but as said we don't need or want this ourselves at the moment.

Yes, thanks so far, the information you gave me already helped and perhaps someone builds this into a separate plugin or so in the future

thanks and best regards,
ghk

@githubkoma
Copy link
Author

githubkoma commented May 10, 2023

a Proof of Concept for a Nextcloud Integration can be found here: https://github.com/githubkoma/webpush

For what i've found out:

  • on iOS no browser/tab/app has to be open to receive the notification
  • on Android it seems to be the same
  • for full integration the feature should be within nextcloud itself or the pushproxy
  • ...

@githubkoma
Copy link
Author

The approach over at #1225 looks really sophisticated

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