AniHyou-iOS icon indicating copy to clipboard operation
AniHyou-iOS copied to clipboard

Push notifications

Open axiel7 opened this issue 2 years ago • 6 comments

Edit: Maybe possible using background tasks

axiel7 avatar Sep 24 '23 04:09 axiel7

Firebase Cloud Messaging could do the work, doesn't it?

Jeanlo avatar Oct 03 '23 14:10 Jeanlo

Firebase Cloud Messaging could do the work, doesn't it?

I think I would still need a dedicated server to execute the query for the notifications

axiel7 avatar Oct 06 '23 07:10 axiel7

Firebase Cloud Messaging could do the work, doesn't it?

I think I would still need a dedicated server to execute the query for the notifications

Based on the docs I'm reading FCM or some other cloud messaging should be able to do what you need. It would be the originating server and would send the message to APN servers to deliver the push notification.

BitForger avatar Feb 04 '24 03:02 BitForger

Based on the docs I'm reading FCM or some other cloud messaging should be able to do what you need

The Android implementation is as follows:

  1. A periodic background task is scheduled to run in-device every X hours (the user can choose the frequency)
  2. The task is run and calls the AniList API to get new unread notifications
  3. The task creates and send the Android notifications. Then repeat from step 1.

On iOS the periodic background task isn't possible, so I need another way to execute the step 2. That means I need a dedicated server which runs the notification query for every user using AniHyou, and this cost money.

This is what I think is possible with my current knowledge but I'm open for other suggestions

axiel7 avatar Feb 04 '24 03:02 axiel7

On iOS the periodic background task isn't possible, so I need another way to execute the step 2. That means I need a dedicated server which runs the notification query for every user using AniHyou, and this cost money.

Really? I have a third-party weather app that periodically updates it's state based on the location I'm in. I believe it must check location and reach out to an API to get weather updates for that location to update the widget and watch complications

BitForger avatar Feb 04 '24 03:02 BitForger

I'm not closing this yet because the current implementation isn't very reliable, this needs more work

axiel7 avatar May 27 '24 16:05 axiel7