You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was using the subscribeToTopic() and unsubscribeFromTopic() APIs of Firebase Cloud Messaging, I found that when the device cannot access the Google server, the relevant APIs will be retried indefinitely, and the developer cannot control and close the Firebase subscription process through threads such as the lifecycle.
I hope to leave the relevant retry operations to the developer, such as launching an API that "only attempts to subscribe once", so that the developer can receive an error callback and decide whether to retry after an error; or launching an API with a time parameter (for example, passing in 5000L means that if the retry fails after 5 seconds, the process will be closed and the error will be called back).
How would you use it?
The following is for reference only and does not mean that I require Firebase to implement the following APIs
subscribeToTopicWithTimeout(topic, timeoutMillis) / unsubscribeToTopicWithTimeout(topic, timeoutMillis)
Indicates that the subscription operation is allowed to be retried within a given time. After the time exceeds the limit, the subscription is terminated and an error is callbacked.
subscribeToTopicOnce(topic) / unsubscribeToTopicOnce(topic)
It means that it will be executed only once, whether it succeeds or fails, and a callback will be made to check whether it succeeds.
The text was updated successfully, but these errors were encountered:
What feature would you like to see?
When I was using the
subscribeToTopic()
andunsubscribeFromTopic()
APIs of Firebase Cloud Messaging, I found that when the device cannot access the Google server, the relevant APIs will be retried indefinitely, and the developer cannot control and close the Firebase subscription process through threads such as the lifecycle.I hope to leave the relevant retry operations to the developer, such as launching an API that "only attempts to subscribe once", so that the developer can receive an error callback and decide whether to retry after an error; or launching an API with a time parameter (for example, passing in 5000L means that if the retry fails after 5 seconds, the process will be closed and the error will be called back).
How would you use it?
subscribeToTopicWithTimeout(topic, timeoutMillis)
/unsubscribeToTopicWithTimeout(topic, timeoutMillis)
Indicates that the subscription operation is allowed to be retried within a given time. After the time exceeds the limit, the subscription is terminated and an error is callbacked.
subscribeToTopicOnce(topic)
/unsubscribeToTopicOnce(topic)
It means that it will be executed only once, whether it succeeds or fails, and a callback will be made to check whether it succeeds.
The text was updated successfully, but these errors were encountered: