Pz1c / WavingHands

Android client for web base Waving Hands (spell caster) game on games.ravenblack.net
6 stars 0 forks source link

Server side notifications #336

Open Prulon opened 10 months ago

Prulon commented 10 months ago

Issue Seems like we can't really trust the existing background "Pull" based notifications, and need to replace with normal server side "Push"

Task Register players for notifications:

Move existing "turn based" and "non turn based" notifications to server side (see original issue below)

Every notification probably needs the following fields, so the client knows what to display:

Private Invites:

New Game:

End Game:

Register players for game notifications:

Daily reconciliation: assuming some of these might get missed, we need also a periodic push

Non game notifications: Once a day, go over the list of all the players that were NOT active in the last 3 days. When 7 / 30 / 90 / 180 / 270 / ... days have past since last visit --> send a notification saying: We missed you, open game list Text: "Checkout your new game match!" Action: "Show me" clicking on the notification will open the game list

See also original issue: https://github.com/Pz1c/WavingHands/issues/110 end game: https://github.com/Pz1c/WavingHands/issues/146 new turn: https://github.com/Pz1c/WavingHands/issues/147 private invite: https://github.com/Pz1c/WavingHands/issues/145 new game: https://github.com/Pz1c/WavingHands/issues/144

Pz1c commented 10 months ago

looks like we need "Foreground service" https://developer.android.com/develop/background-work/services/foreground-services

maybe this https://www.magicbell.com/blog/how-to-set-up-android-push-notifications

https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages

https://firebase.google.com/docs/cloud-messaging/android/receive

https://andrewsnydertech.medium.com/how-to-show-notifications-in-the-background-on-android-f368c4cd1415

P.S. just for history, please ignore

Pz1c commented 9 months ago

@Prulon in new build notifications work, maybe we decrease priority (maybe after live games, because for live game I developing our server and we can use it for server side notification)

Prulon commented 9 months ago

I don't get any notifications...

On Mon, Dec 25, 2023, 17:34 Pz1c @.***> wrote:

@Prulon https://github.com/Prulon in new build notifications work, maybe we decrease priority (maybe after live games, because for live game I developing our server and we can use it for server side notification)

— Reply to this email directly, view it on GitHub https://github.com/Pz1c/WavingHands/issues/336#issuecomment-1869029452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASVGIJARHF7WRMCDCDZG2MTYLGMJXAVCNFSM6AAAAABA3B2OC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGAZDSNBVGI . You are receiving this because you were mentioned.Message ID: @.***>

Prulon commented 9 months ago

I actually did, so let's see. But I also get the error message that I wrote you about in email

On Tue, Dec 26, 2023, 00:43 Ido Milstein @.***> wrote:

I don't get any notifications...

On Mon, Dec 25, 2023, 17:34 Pz1c @.***> wrote:

@Prulon https://github.com/Prulon in new build notifications work, maybe we decrease priority (maybe after live games, because for live game I developing our server and we can use it for server side notification)

— Reply to this email directly, view it on GitHub https://github.com/Pz1c/WavingHands/issues/336#issuecomment-1869029452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASVGIJARHF7WRMCDCDZG2MTYLGMJXAVCNFSM6AAAAABA3B2OC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGAZDSNBVGI . You are receiving this because you were mentioned.Message ID: @.***>

Pz1c commented 7 months ago

I suppose we need change order for server side notification and do live match first @Prulon ?

Pz1c commented 7 months ago

ok I see that notification not working for android above 11 so we really need server side notification