Hi,
We are trying to implement a push notification system to our game. It works perfectly, but we need to add a time to live option for notifications. Code below does not do anything with ttl.
I think "android":{"priority":"high","ttl":"10s"} is a wrong usage but couldn't find anything in documentation.
Any suggestions? Thanks.
Note: I've already tried AdvancedPlatformDelivery, but it didn't work.
handlers.SendPushNotificationToFriend = function (args) { var targetId = args.TargetId; var logArrayObject = []; var functionMessage = args.FunctionMessage; var splittedMessage = functionMessage.split("/"); var obj = { playerID: currentPlayerId, fMessage : functionMessage, "android":{"priority":"high","ttl":"10s"} }; var myJSON = JSON.stringify(obj); try { server.SendPushNotification({ Recipient : targetId, Package : { Message : "Co-Op Game / " + splittedMessage[5] + " / " + splittedMessage[6] + " / " + splittedMessage[7], Title: splittedMessage[2] + " sent you a challange!", CustomData: myJSON, } }); } catch (ex) { logArrayObject.push("Error->" + ex.Message + " ID-->" + args.TargetId); // Target player has not registered for Push Notifications } return { returnLogValue: logArrayObject }; }