customer-android-kotlin

//core/com.kustomer.core.providers/KusChatProvider/checkPubNubConnectionAndReconnectIfNeeded

checkPubNubConnectionAndReconnectIfNeeded

[androidJvm]
abstract suspend fun checkPubNubConnectionAndReconnectIfNeeded(completion: (KusResult<Unit>) -> Unit?)

Checks PubNub connection and subscription health, reconnecting if needed. This method should be called when the app returns to foreground after being in the background for an extended period to ensure subscriptions are active.

Note: This is an internal method (not public - called automatically by SDK). This is a suspend function and should be called from Kotlin Coroutines. Matches iOS pattern: returns Unit, result passed via completion handler.

Parameters

androidJvm

   
completion Optional completion handler called when the check/reconnection completes (matches iOS pattern). Result is passed via this handler.