# Instance Properties
# AppState
Description
Returns current TrueConf MAUI VideoSDK component state. It is implemented in the TrueConfVideoSDK.API.VideoSDK class.
public int AppState { get; }
Return value
| Type | Description |
|---|---|
| int | Application state. It can be as follows: • 0 - no connection with the server • 1 - TrueConf MAUI VideoSDK is trying to connect to the server • 2 - Login is required • 3 - TrueConf MAUI VideoSDK is connected to the server and logged in • 4 - TrueConf MAUI VideoSDK is waiting: either it is calling someone or it is being called by someone • 5 - TrueConf MAUI VideoSDK is in a conference • 6 - TrueConf MAUI VideoSDK is ending a conference |
Example
using TrueConfVideoSDK.API;
public partial class MainPage : ContentPage
{
private VideoSDK _sdk;
....
_sdk = this.VideoSDKControl.SDK;
....
}
private void OnInviteReceived(object? sender, string jsonStr)
{
// If we are in call or we are not doing anything we reject
if (_sdk.AppState <= 3 || _sdk.AppState == 5)
{
// Reject an incoming call or invitation to a group conference
_sdk.Methods.reject();
}
// Accept an incoming call or invitation to a group conference
_sdk.Methods.accept();
}
See also