How integrate Notification push with Nakama and Unity

Hey !
I’m a game developer on Unity and I’m new with Nakama.
I made a game where you can add friends and send them a popup to play in a private match.
I don’t have experience in web development so just to ask if it’s difficult to set up push notifications so that if my friend is offline in game, send him a push notification when I ask him to fight in the game.
Thanks !

Push notifications are quite a complicated thing, that strictly depends on a target platform(device and operating system where you wish to see the notifications), and used provider, which are not so many, so let’s list them: apple apns, google FCM(GCM), HUAWEI notifications(HMS), Mozilla Services and Microsoft Notification Hubs. These services is monopolists of the notifications market, so no one can send a push notification bypassing them, including Nakama or other companies, which, unlike Nakama, promise to send, but in fact are only intermediaries between users and listed services.
First of all, you need to find out which target platform you would like to send push notifications to, and try to understand what you need for that. Each platform and provider has its own specifics. Nakama is not a Push provider so it can’t help you do that.
Possible solution: you can place near the Nakama kind of a push sender, like this, similar or your own solution, make your own RPC call that will decide: if a player in game online, then send him in-game message, otherway, send a message to this server that will pass it to all(configured) target device(s).

What @shprot said about the complexities of interacting with the providers Push Notifications APIs directly is true, we usually recommend to integrate with a provider such as OneSignal.

Thanks for the reply, i’m working on a mobile game for android and iOS platforms, i heard about OneSignal, i’ll check about that thanks !

I’ve checked one signal, and yes i think that’s gonna be a great solution for my game, thanks for your help !

1 Like