Network Events
Wisej.NET Hybrid applications support monitoring the current network status of the Hybrid device.
Sample
The current network state is accessible through Wisej.Hybrid.Device.Networking in the published 4.1.4 contract.
// can the device connect to the internet:
NetworkAccess access = Device.Networking.NetworkAccess;
// Cellular, WiFi, Ethernet, etc.
ConnectionProfile[] profiles = Device.Networking.ConnectionProfiles;
Monitor Network Events
It's possible to monitor changes in the network state using Device.Networking.
Device.Networking.ConnectivityChanged += (s, e) =>
{
NetworkAccess access = e.NetworkAccess;
ConnectionProfile[] profiles = e.ConnectionProfiles;
};
warning
Keep in mind, monitoring NetworkAccess may not work when using an online application as the application may not be able to connect to the remote web server.
Further Reading
API reference
Device API. See Platform Capabilities before relying on native behavior.