Essential Kit
Loading...
Searching...
No Matches
TaskServices

The TaskServices class provides cross-platform interface to schedule or continue tasks in background. This can be used for running tasks uninterruptedly. More...

Static Public Member Functions

static void Initialize (TaskServicesUnitySettings settings)
 [Optional] Initialize the Task Services module with the given settings. This call is optional and only need to be called if you have custom settings to initialize this feature.
 
static Task AllowRunningApplicationInBackgroundUntilTaskCompletion (Task task, Callback onBackgroundProcessingQuotaWillExpireCallback=null)
 Allow application background processing until task completion. All tasks which are started other the passed task are also allowed to complete until this task completes.".
 
static Task< TResult > AllowRunningApplicationInBackgroundUntilTaskCompletion< TResult > (Task< TResult > task, Callback onBackgroundProcessingQuotaWillExpireCallback=null)
 Allow application background processing until task completion. All tasks which are started other the passed task are also allowed to complete until this task completes.".
 
static Task AllowRunningApplicationInBackgroundUntilCompletion (this Task task, Callback onBackgroundProcessingQuotaWillExpireCallback=null)
 Extension method for a task to allow application background processing until it's completion. All tasks which are started other the passed task are also allowed to complete until this task completes.".
 
static Task< TResult > AllowRunningApplicationInBackgroundUntilCompletion< TResult > (this Task< TResult > task, Callback onBackgroundProcessingQuotaWillExpireCallback=null)
 Extension method for a task to allow application background processing until it's completion. All tasks which are started other the passed task are also allowed to complete until this task completes.".
 

Properties

static TaskServicesUnitySettings UnitySettings [get]
 The settings used for initialization.
 

Detailed Description

iOS platform has limited support for background execution compared to Android platform.


Member Function Documentation

◆ Initialize()

static void Initialize ( TaskServicesUnitySettings settings)
static
Parameters
settingsThe settings to be used for initialization.

The settings configure the behavior of the Task Services module.

References TaskServices.UnitySettings.

◆ AllowRunningApplicationInBackgroundUntilTaskCompletion()

static Task AllowRunningApplicationInBackgroundUntilTaskCompletion ( Task task,
Callback onBackgroundProcessingQuotaWillExpireCallback = null )
static
Parameters
taskPass task to complete without interruption.
onBackgroundProcessingQuotaWillExpireCallbackCallback triggered when background processing quota about to expire. Cleanup any resources here if you want to.
Returns
Task to be awaited on.

Referenced by TaskServices.AllowRunningApplicationInBackgroundUntilCompletion().

◆ AllowRunningApplicationInBackgroundUntilTaskCompletion< TResult >()

static Task< TResult > AllowRunningApplicationInBackgroundUntilTaskCompletion< TResult > ( Task< TResult > task,
Callback onBackgroundProcessingQuotaWillExpireCallback = null )
static
Parameters
taskPass task which can return a result to complete without interruption.
onBackgroundProcessingQuotaWillExpireCallbackCallback triggered when background processing quota about to expire. Cleanup any resources here if you want to.
Returns
Task to be awaited on.

Referenced by TaskServices.AllowRunningApplicationInBackgroundUntilCompletion< TResult >().

◆ AllowRunningApplicationInBackgroundUntilCompletion()

static Task AllowRunningApplicationInBackgroundUntilCompletion ( this Task task,
Callback onBackgroundProcessingQuotaWillExpireCallback = null )
static
Parameters
taskCall this method on a task to complete without interruption.
onBackgroundProcessingQuotaWillExpireCallbackCallback triggered when background processing quota about to expire. Cleanup any resources here if you want to.
Returns
Task to be awaited on.

References TaskServices.AllowRunningApplicationInBackgroundUntilTaskCompletion().

◆ AllowRunningApplicationInBackgroundUntilCompletion< TResult >()

static Task< TResult > AllowRunningApplicationInBackgroundUntilCompletion< TResult > ( this Task< TResult > task,
Callback onBackgroundProcessingQuotaWillExpireCallback = null )
static
Parameters
taskCall this method on a task to complete without interruption.
onBackgroundProcessingQuotaWillExpireCallbackCallback triggered when background processing quota about to expire. Cleanup any resources here if you want to.
Returns
Task to be awaited on.

References TaskServices.AllowRunningApplicationInBackgroundUntilTaskCompletion< TResult >().