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
about 7 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 .
But leaving the expire-hours blank ensures the message never expires, right?
Customer Support
said
about 7 years ago
Answer
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 .
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 Newest FirstDavid Brandes
Thanks for the information.
Customer Support
Baris Tumerkan
Hi Sean,
But leaving the expire-hours blank ensures the message never expires, right?
Customer 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
-
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 2487 topics