I have some messages I only want to send when the player is online. Do I achieve this, when I set expire to 0 in the message configurator?
The expire field does not exists in the documentaion at: https://docs.gamesparks.net/developer-portal/notifications
Cheers David
Best Answer
C
Customer Support
said
over 5 years ago
Hey David,
Yes, setting the expire-hours to '0' will send the message and then delete it. Note that the message will be deleted, and wont appear in the log if you need info from it later; just something to consider. However, it may take a few minutes for the message to actually be deleted, so test it out and if it is taking too long, you could think about sending the messages through cloud-code. You can check if a player is online using Spark.getPlayer() then send out the message using SparkMessage .
Yes, setting the expire-hours to '0' will send the message and then delete it. Note that the message will be deleted, and wont appear in the log if you need info from it later; just something to consider. However, it may take a few minutes for the message to actually be deleted, so test it out and if it is taking too long, you could think about sending the messages through cloud-code. You can check if a player is online using Spark.getPlayer() then send out the message using SparkMessage .
Hope that helps, Sean
B
Baris Tumerkan
said
over 5 years ago
Hi Sean,
But leaving the expire-hours blank ensures the message never expires, right?
David Brandes
Hi,
I have some messages I only want to send when the player is online. Do I achieve this, when I set expire to 0 in the message configurator?
The expire field does not exists in the documentaion at: https://docs.gamesparks.net/developer-portal/notifications
Cheers David
Yes, setting the expire-hours to '0' will send the message and then delete it. Note that the message will be deleted, and wont appear in the log if you need info from it later; just something to consider.
However, it may take a few minutes for the message to actually be deleted, so test it out and if it is taking too long, you could think about sending the messages through cloud-code.
You can check if a player is online using Spark.getPlayer() then send out the message using SparkMessage .
Hope that helps,
Sean
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Yes, setting the expire-hours to '0' will send the message and then delete it. Note that the message will be deleted, and wont appear in the log if you need info from it later; just something to consider.
However, it may take a few minutes for the message to actually be deleted, so test it out and if it is taking too long, you could think about sending the messages through cloud-code.
You can check if a player is online using Spark.getPlayer() then send out the message using SparkMessage .
Hope that helps,
Sean
Baris Tumerkan
Hi Sean,
But leaving the expire-hours blank ensures the message never expires, right?
Customer Support
David Brandes
Thanks for the information.
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2486 topics