C# Class SensorbergSDK.Background.BackgroundEngine

BackgroundEngine resolves actions from BluetoothLEAdvertisementWatcherTriggerDetails object and resolves delayed actions. This is not part of the public API. Making modifications into background tasks is not required in order to use the SDK.
Inheritance: IDisposable
Afficher le fichier Open project: sensorberg-dev/windows10-sdk Class Usage Examples

Private Properties

Свойство Type Description
AddBeaconArgs void
AddBeaconsToBeaconArgsAsync System.Threading.Tasks.Task
IsOutOfRange bool
IsValidEnterEvent bool
OnBeaconActionResolvedAsync void

Méthodes publiques

Méthode Description
BackgroundEngine ( ) : System
Dispose ( ) : void

Finishes background processing and releases all resources.

InitializeAsync ( ) : System.Threading.Tasks.Task

Initializes BackgroundEngine.

ProcessDelayedActionsAsync ( bool flushHistory = true ) : System.Threading.Tasks.Task

Processes the delayed actions, executes them as necessary and sends history statistics.

ResolveBeaconActionsAsync ( List beacons, int outOfRangeDb ) : System.Threading.Tasks.Task

Resolves beacons, which triggered the background task.

Private Methods

Méthode Description
AddBeaconArgs ( Beacon beacon, BeaconEventType eventType ) : void
AddBeaconsToBeaconArgsAsync ( int outOfRangeDb ) : System.Threading.Tasks.Task

Generates BeaconArgs from beacon events. For instance if a beacon is seen for the first time, BeaconArgs with enter type is generated.

IsOutOfRange ( int outOfRangeDb, Beacon beacon ) : bool
IsValidEnterEvent ( BackgroundEvent history, Beacon beacon, int outOfRangeDb ) : bool
OnBeaconActionResolvedAsync ( object sender, BeaconAction beaconAction ) : void

Handles BeaconActions that are resolved in the SDKEngine. All resolved actions are stored into local database. And the UI app will show actions to the user. When the UI app is not running, toast notification is shown for the user.

Method Details

BackgroundEngine() public méthode

public BackgroundEngine ( ) : System
Résultat System

Dispose() public méthode

Finishes background processing and releases all resources.
public Dispose ( ) : void
Résultat void

InitializeAsync() public méthode

Initializes BackgroundEngine.
public InitializeAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

ProcessDelayedActionsAsync() public méthode

Processes the delayed actions, executes them as necessary and sends history statistics.
public ProcessDelayedActionsAsync ( bool flushHistory = true ) : System.Threading.Tasks.Task
flushHistory bool
Résultat System.Threading.Tasks.Task

ResolveBeaconActionsAsync() public méthode

Resolves beacons, which triggered the background task.
public ResolveBeaconActionsAsync ( List beacons, int outOfRangeDb ) : System.Threading.Tasks.Task
beacons List
outOfRangeDb int
Résultat System.Threading.Tasks.Task