I am building a simple game in which 2 people can duel against each other. I use GameSparks as the back end. My problem is that whenever player # 1 casts a spell that directs, player # 2 can only see the channel when his screen is on and in focus.
When player # 2's screen turns off, the application is no longer active, so the spell does not drop on him. When player # 2 turns on the screen, channeling begins, but player # 1 has already made the channel back.
I guess this is due to how the Android system works. This puts applications that do not focus on pause.
Now my problem is how can I make sure that player # 2 receives a notification when he hits the spell, without having to use a third-party service to support the application (to avoid huge battery consumption), and also without having to use push notifications (as from what I heard, if there is a high load, pressing does not happen immediately, since there is a queue)
source
share