API/Autodoc/Classes/RuStore.AppUpdate.RuStoreAppUpdateManager.en.md


Public Functions

Name
bool Init()
Initializes the singleton RuStoreAppUpdateManager.
void GetAppUpdateInfo(Action< RuStoreError > onFailure, Action< AppUpdateInfo > onSuccess)
Checks for available updates.
void RegisterListener(IInstallStateUpdateListener listener)
Registers a listener for the update download status.
void UnregisterListener(IInstallStateUpdateListener listener)
If the listener is no longer needed, use the method UnregisterListener() to remove it, passing the previously registered listener.
void StartUpdateFlow(UpdateType updateType, Action< RuStoreError > onFailure, Action< UpdateFlowResult > onSuccess)
Starts the application update download procedure.
bool IsImmediateUpdateAllowed()
Checks if forced update is allowed.
void CompleteUpdate(UpdateType updateType, Action< RuStoreError > onFailure)
Starts the update installation procedure. Only two completion types can be passed to the method: RuStore.AppUpdate.UpdateType.FLEXIBLE and RuStore.AppUpdate.UpdateType.SILENT.

Public Properties

Name
bool IsInitialized — Returns true if the singleton was initialized, otherwise false.
RuStoreAppUpdateManager Instance — Returns the only instance of RuStoreAppUpdateManager (Singleton pattern implementation). If the instance does not exist, it creates one.

Public Attributes

Name
string PluginVersion — Plugin version.

function Init

bool Init()

Initializes the singleton RuStoreAppUpdateManager.

Return: Returns true if initialization was successful, otherwise false.


bool isInitialized = RuStoreAppUpdateManager.Instance.Init();

Filename: public_bool_Init.cs

function GetAppUpdateInfo

void GetAppUpdateInfo(
    Action< RuStoreError > onFailure,
    Action< AppUpdateInfo > onSuccess
)

Checks for available updates.

Parameters:

  • onFailure Action executed in case of an error. Returns an RuStore.RuStoreError object with error information.
  • onSuccess Action executed upon successful completion. Returns an RuStore.AppUpdate.AppUpdateInfo object with update requirement information.

RuStoreAppUpdateManager.Instance.GetAppUpdateInfo(
    onFailure: (error) => {
        // Process error
    },
    onSuccess: (info) => {
        // Process update info
    }
);

Filename: public_void_GetAppUpdateInfo.cs

function RegisterListener

void RegisterListener(
    IInstallStateUpdateListener listener
)

Registers a listener for the update download status.

Parameters:

  • listener An object of a class implementing the RuStore.AppUpdate.Internal.IInstallStateUpdateListener interface.

RuStoreAppUpdateManager.Instance.RegisterListener(listener);

Filename: public_void_RegisterListener.cs

function UnregisterListener

void UnregisterListener(
    IInstallStateUpdateListener listener
)

If the listener is no longer needed, use the method UnregisterListener() to remove it, passing the previously registered listener.

Parameters:

  • listener An object of a class implementing the RuStore.AppUpdate.Internal.IInstallStateUpdateListener interface.

RuStoreAppUpdateManager.Instance.UnregisterListener(listener);

Filename: public_void_UnregisterListener.cs

function StartUpdateFlow

void StartUpdateFlow(
    UpdateType updateType,
    Action< RuStoreError > onFailure,
    Action< UpdateFlowResult > onSuccess
)

Starts the application update download procedure.

Parameters:

  • updateType Type of the update download procedure.
  • onFailure Action executed in case of an error. Returns an RuStore.RuStoreError object with error information.
  • onSuccess Action executed upon successful completion. Returns an RuStore.AppUpdate.RuStore.UpdateFlowResult object with update operation result information.

RuStoreAppUpdateManager.Instance.StartUpdateFlow(
    updateType: UpdateType.Flexible,
    onFailure: (error) => {
    },
    onSuccess: (result) => {
    }
);

Filename: public_void_StartUpdateFlow.cs

function IsImmediateUpdateAllowed

bool IsImmediateUpdateAllowed()

Checks if forced update is allowed.

Return: Returns true if forced update is available, otherwise false.


bool isAllowed = RuStoreAppUpdateManager.Instance.IsImmediateUpdateAllowed();

Filename: public_bool_IsImmediateUpdateAllowed.cs

function CompleteUpdate

void CompleteUpdate(
    UpdateType updateType,
    Action< RuStoreError > onFailure
)

Parameters:

  • updateType Type of the update completion procedure.
  • onFailure Action executed in case of an error. Returns an RuStore.RuStoreError object with error information.

RuStoreAppUpdateManager.Instance.CompleteUpdate(
    updateType: UpdateType.FLEXIBLE,
    onFailure: (error) => {
        // Process error
    }
);

Filename: public_void_CompleteUpdate.cs

property IsInitialized

bool IsInitialized;

Returns true if the singleton was initialized, otherwise false.

property Instance

static RuStoreAppUpdateManager Instance;

Returns the only instance of RuStoreAppUpdateManager (Singleton pattern implementation). If the instance does not exist, it creates one.


var instance = RuStoreAppUpdateManager.Instance;

Filename: public_static_RuStoreAppUpdateManager_Instance.cs

variable PluginVersion

static string PluginVersion = "10.5.0";

Plugin version.