0

I am looking for a way to expire(delete) the notification received on client device from drawer after certain time .

for iOS we can set apns-expiration an unix epoch in future when to make this notification invalid and discard, found here https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

for android we can set time_to_live in firebase message to expire a notification. found here https://firebase.google.com/docs/cloud-messaging/concept-options#ttl

I understand one thing
Both on apns-expiration and time_to_live on respective APNS and FCM platforms are used to say till when the platform has to retry to send a specific message .

But my question is are these values also used to expire a notification received after that time is completed.

amplify node sdk accepts TimeToLive which sets apns-expiration for APNS message and time_to_live for FCM message doc found here. https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Pinpoint.html#sendMessages-property

i've tried setting TimeToLive in pinpoint.sendMessage params but the notification does not get cleared on device.

Thanks in advance.

charithreddyv
  • 135
  • 4
  • 12

0 Answers0