Network unavailable event
The network unavailable event serves as a notification when the network becomes unavailable.
LINE Planet will try to reconnect the call for a while after a network unavailable event occurs. If the reconnection attempt fails, the call is disconnected. If the reconnection attempt is successful, LINE Planet continues the call with a network re-available event.
You can use these events to display a message with the status of network in the current call on your application.
| Supported call type | Supported version |
|---|---|
| 1-to-1 call | All versions |
| Group call (conference) | PlanetKit 5.4 or higher |
1-to-1 call
In 1-to-1 calls, the following callbacks of ICallEvent are used for the network unavailable event and the network re-available event.
Network unavailable event callback
The OnNetworkUnavailable callback is invoked when the network has a problem. This callback includes the following parameters:
| Parameter | Description |
|---|---|
bIsPeer | Whether there is a problem with the peer. Can be one of the following values: - true: The peer's network has a problem. - false: The local user's network has a problem. |
nDisconnectAfterSec | Time to end the call when reconnection fails (in seconds). If reconnection fails, the call is disconnected after this duration with the disconnect reason of UNAVAILABLE_NETWORK. |
Network re-available event callback
The OnNetworkReavailable callback is invoked when the network is recovered. This callback includes the following parameter:
| Parameter | Description |
|---|---|
bIsPeer | Whether there was a problem with the peer. Can be one of the following values: - true: The peer's network had a problem. - false: The local user's network had a problem. |
Group call
In group calls, the following callbacks of IConferenceEvent are used for the network unavailable event and the network re-available event.
Network unavailable event callback
The OnNetworkUnavailable callback is invoked when the local user's network has a problem. This callback includes the following parameter:
| Parameter | Description |
|---|---|
nWillDisconnectAfterSec | Time to end the call when reconnection fails (in seconds). If reconnection fails, the call is disconnected after this duration with the disconnect reason of UNAVAILABLE_NETWORK. |
Network re-available event callback
The OnNetworkReavailable callback is invoked when the the local user's network is recovered.