Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FireBase Cloud Messaging (FCM) subscribing/unsubscribing to topic When OFFLINE

Does FCM simply not send the subscribeToTopic(topic) and unsubscribeFromTopic(topic) when app has no internet access? Or does it store it locally and send as soon as internet connection is available?

If so what are the conditions for doing so (i.e. maximum time it waits for internet before it fails, if the app is closed does it still send the subscription or does it only happen when app is open or open in background)

like image 440
Jaad Chacra Avatar asked Aug 08 '16 08:08

Jaad Chacra


1 Answers

subscribeToTopic(topic) and unsubscribeFromTopic(topic) operation are cached locally until they are successfully communicated to the FCM backend.

If the device is offline the subscribe/unsubscribe operations are stored on disk and performed when the device is connected and app is running (either in background or foreground). There is no maximum time for this to happen.

like image 120
Diego Giorgini Avatar answered Oct 28 '22 23:10

Diego Giorgini