Sign In Register

How can we help you today?

Start a new topic

SocialRankChangedMessage push notification not working

I followed this tutorial and was successfully able to send a push notification to my phone using the test described in the tutorial.


I am trying to implement a push notification being sent when someones friend beats their score.


In my leaderboard, social notifications are on.


For SocialRankChangedMessage.

send via socket, is off

send as push, is on

Suppress Push On Socket Send, is off


Android is included in device types


I log in on my phone (and also successfully call PushRegistrationRequest) as user1, who has a higher score than user 2


Then log in as user 2 on the test harness, and submit a score higher than user 1's highest


Everything seems to work and I can see the social scoreboard on my phone with the new score,

but I never get any push notification. What am I missing? thanks!

1 person has this question

Hi Brian

When are you sending the PushRegistrationRequest? 

The push id only needs to be sent to gamesparks once, sending it multiply times can effect the push messages and cause them not to work.

Does player 2 have the app open or is it in the background?



1 person likes this
I was calling PushRegistrationRequest every time a user logs on. Though it didnt seem to be causing issues with the test push notification, which worked fine every time.

Player 2 does not have the app open, I'm authenticating and submitting a high score for them via the test harness.
Player 1, may or may not have it open, it doesnt seem to make any difference.

Based on ure comment I should add some push device management, so I'm not calling PushRegistrationRequest every time, and so if a new user logs on the old push registration is cancelled and so on.
(Btw I did call PushRegistrationRequest for a few of my test users on my phone, including player 2 I think, so maybe that is causing an issue??)


Hi Brian

I would recommend not sharing push ids(devices) along test players as this can complicate testing.

Have you been able to see if the SocialRankChangeMessage is being called via Analytics->APIStream Type->equal-> SocialRankChangeMessage ?



I checked the analytics and the the SocialRankChangeMessage is being called
  "leaderboardName":"High scores leaderboards",
  "summary":"Your social rank has changed on the High scores leaderboards leaderboard",
    "userName":"Helen Alacgicfedchj Occhinowitz",
    "userName":"James Floop",


I did try to do a better test this morning, with a different device and two new users. Just call push registration once for one user and then try it.. But the firebase SDK is not working on my other phone >:(    (an old S2)

Next thing I will try is to unregister all the users from my device and try the above test on that.

btw How do I unregister a device for push notifications?

Thanks a lot!!


Hi Brian

It's isn't possible to unregister a device that is connected to a player.

Push notifications will only work when the app is not open.

Can you try sending a push using a custom event and message?




So the test push notification from the tutorial works on my phone for multiple users that have registered the device
Thats a custom event with this cloud code.
var msg = Spark.message(null);
msg.setMessageData({"title":"test title","body":"test body"});
 I did also make a custom message called TESTPUSHMESSAGE

and created a custom event with this cloud code
var msg = Spark.message("TESTPUSHMESSAGE")


This did not work, though I'm only starting with gamesparks and dont know what I'm doing, so I dont even know if that should have worked


That image did not work..


Hi Brian


The custom message is not being sent because the Device Types is set to "ANDROID"

Can you leave this blank or set it to "FCM"



Ok I think that was the problem!
Leaving that field blank made my custom message work.

I had also setup the SocialRankChangedMessage that way. After blanking that field on SocialRankChangedMessage. now I am getting push notifications when one player beats anothers high score.

The message just appears as..


But hopefullt I should be able to figure out how to customize it.

Just fyi here is what my SocialRankChangedMessage looks like now

Thanks a lot for your help!

Hey I'm totally fine on this matter now btw. Cheers

Also just fyi this reply / comment feature does not work on firefox

Login to post a comment