C# Class SensorbergSDK.SDKManager

The main interface of Sensorberg SDK.
Show file Open project: sensorberg-dev/windows10-sdk Class Usage Examples

Public Properties

Property Type Description
DemoApiKey string

Public Methods

Method Description
Deinitialize ( bool stopScanner ) : void

De-initializes the SDK.

Dispose ( ) : void

Uninitialize the complete SDK.

FlushHistory ( ) : Task

Sends all pending history elements.

InitializeAsync ( SdkConfiguration configuration ) : Task

Initializes the SDK using the given configuration. The scanner can be used separately, but the resolving beacon actions cannot be done unless the SDK is initialized. If background task is enabled, this method check if there are updates for the background task filters available and updates them if so.

Instance ( ) : SDKManager

Returns the singleton instance of this class.

InvalidateCacheAsync ( ) : Task

Invalidates the current layout cache.

LaunchBluetoothSettingsAsync ( ) : Task

Utility method for launching bluetooth settings on device.

OnApplicationVisibilityChanged ( object sender, VisibilityChangedEventArgs e ) : void

Sets the SDK preferences based on the application visibility. Hook this event handler to Window.Current.VisibilityChanged.

RegisterBackgroundTaskAsync ( ) : Task

Registers the background task or in the case of a pending background filter update, re-registers the task.

StartScanner ( ) : void

Starts the scanner and starts to listen to beacon events.

StopScanner ( ) : void

Stops the scanner and stops listening to beacon events.

UnregisterBackgroundTask ( ) : void

Unregisters the background task.

UpdateBackgroundTaskIfNeededAsync ( ) : Task

Private Methods

Method Description
InitializeAsync ( string apiKey, string timerClassName = null, string advertisementClassName = null, string uuidSpace = Constants.SensorbergUuidSpace, bool startScanning = true ) : Task
InitializeSettingsAsync ( ) : Task
Instance ( ushort manufacturerId, ushort beaconCode ) : SDKManager
OnBeaconEventAsync ( object sender, BeaconEventArgs e ) : void

Called, when scanner sends a beacon event. If the background task is registered, it will resolve the actions and we do nothing here.

OnScannerStatusChanged ( object sender, ScannerStatus e ) : void
OnSettingsUpdated ( object sender, SettingsEventArgs settingsEventArgs ) : void
SDKManager ( ) : System

Constructor.

StartScannerTimerCallback ( object state ) : void

Method Details

Deinitialize() public method

De-initializes the SDK.
public Deinitialize ( bool stopScanner ) : void
stopScanner bool If true, will stop scanner if running.
return void

Dispose() public static method

Uninitialize the complete SDK.
public static Dispose ( ) : void
return void

FlushHistory() public method

Sends all pending history elements.
public FlushHistory ( ) : Task
return Task

InitializeAsync() public method

Initializes the SDK using the given configuration. The scanner can be used separately, but the resolving beacon actions cannot be done unless the SDK is initialized. If background task is enabled, this method check if there are updates for the background task filters available and updates them if so.
public InitializeAsync ( SdkConfiguration configuration ) : Task
configuration SdkConfiguration
return Task

Instance() public static method

Returns the singleton instance of this class.
public static Instance ( ) : SDKManager
return SDKManager

InvalidateCacheAsync() public method

Invalidates the current layout cache.
public InvalidateCacheAsync ( ) : Task
return Task

LaunchBluetoothSettingsAsync() public method

Utility method for launching bluetooth settings on device.
public LaunchBluetoothSettingsAsync ( ) : Task
return Task

OnApplicationVisibilityChanged() public method

Sets the SDK preferences based on the application visibility. Hook this event handler to Window.Current.VisibilityChanged.
public OnApplicationVisibilityChanged ( object sender, VisibilityChangedEventArgs e ) : void
sender object
e Windows.UI.Core.VisibilityChangedEventArgs
return void

RegisterBackgroundTaskAsync() public method

Registers the background task or in the case of a pending background filter update, re-registers the task.
public RegisterBackgroundTaskAsync ( ) : Task
return Task

StartScanner() public method

Starts the scanner and starts to listen to beacon events.
public StartScanner ( ) : void
return void

StopScanner() public method

Stops the scanner and stops listening to beacon events.
public StopScanner ( ) : void
return void

UnregisterBackgroundTask() public method

Unregisters the background task.
public UnregisterBackgroundTask ( ) : void
return void

UpdateBackgroundTaskIfNeededAsync() public method

public UpdateBackgroundTaskIfNeededAsync ( ) : Task
return Task

Property Details

DemoApiKey public static property

public static string DemoApiKey
return string