Basics

Validating Client

To validate if the client application is connected using Wisej.NET Hybrid, you can use:

bool valid = Wisej.Hybrid.Device.Valid;

Reading Device Information

Information about the hybrid client device is available using the Device.Info member. The Info member contains a number of predefined modules such as system, app version, and battery state information. These modules can be accessed using the following approach in C# and Wisej.NET:

// determine the power source of the connected hybrid device.
BatteryPowerSource powerSource = Device.Info.Battery.PowerSource;

// determine if this is a "first launch" of the application since installation.
bool isFirstLaunchEver = Device.Info.Versioning.IsFirstLaunchEver;

// determine hybrid client cache directory.
string cacheDirectory = Device.Info.FileSystem.CacheDirectory;

Some modules that register information about the hybrid client device are registered dynamically like those that are provided in the Wisej.NET Hybrid Extensions. Those modules can be accessed using the Device.Use<T>() method included where T is an implementation of IClientInfoProvider.

// get the type of biometrics supported by the device.
AuthenticationType = Device.Info.Use<AuthenticationInfoProvider>().AuthenticationType;

This same approach can be used to access built-in modules:

Properties

A number of properties used to configure the hybrid client device are exposed through built-in modules such as Device.Flyout and Device.Email.

Alternatively, properties can be registered through dynamic modules such as those provided in the Wisej.NET Hybrid Extensions. These can be read from and assigned using the Device.Use<T> method where T is the name of the module type.

Methods

Methods can be used to interact with the hybrid client device's hardware or user interface such as toggling a flashlight or writing a file to the client device.

Alternatively, some Wisej.NET Hybrid Extensions may register modules with methods dynamically. These can be called using the Device.Get<T> method where T is the name of the module type.

Events

Events from the hybrid client device are automatically wired from the client device to the Wisej.NET application. Events can be accessed from a member of a built-in module such as Device.Battery, Device.Flyout, or Device.TabBar:

Alternatively, dynamically registered modules such as the Wisej.NET Hybrid Extensions can be accessed and attached using the Device.Use<T>() method where T is the name of the module type.

Last updated