Sign In Register

How can we help you today?

Start a new topic
Answered

How to unregister from push notifications?

How can i unregister current device from push notifications?


Best Answer

Hi Rafal,


You can use the following in Cloud Code to remove the push registrationId from the current player.

 

Spark.getPlayer().removePushRegistration(registrationId);


You can read more about this here.


Thanks,

Liam 


Answer

Hi Rafal,


You can use the following in Cloud Code to remove the push registrationId from the current player.

 

Spark.getPlayer().removePushRegistration(registrationId);


You can read more about this here.


Thanks,

Liam 

how do to get a list of pushRegistrations? I can see in in the returned collections of "player" in NoSQL but how would I get it via cloud code return in unity?

Hi,


You can get a list of the current player's push registrations using:


 

var registrations = Spark.getPlayer().getPushRegistrations()

 


This returns an array of SparkPushRegistrations.


Regards,

Vinnie

Login to post a comment