Wisej.NET Hybrid
HomeNewsSupportVideos
  • Start
    • Introduction
    • Getting Started
    • Going Native with Wisej.NET Hybrid
    • Features
    • API
      • General
        • DeviceInfoBase
        • Device
        • DeviceException
        • DeviceInfo
        • DeviceEvent
        • DeviceException
        • HybridResourcesAttribute
      • Shortcuts
        • DeviceAppActions
        • DeviceAppActionsInfo
        • DeviceAppInfo
        • AppAction
      • Navigation
        • DeviceAppLinks
        • DeviceBrowser
        • DeviceLauncher
        • DeviceNavigation
        • DeviceWindows
        • DeviceWindowsInfo
        • AppLinkEntry
        • BrowserLaunchMode
        • BrowserLaunchOptions
        • BrowserTitleMode
      • Authentication
        • DeviceAuthenticator
        • IWebAuthenticatorResponseDecoder
        • WebAuthenticatorOptions
        • WebAuthenticatorResult
      • UI
        • DeviceBackground
        • DeviceBorder
        • DeviceBottomBar
        • DeviceColors
        • DeviceMenuBar
        • DevicePopups
        • DeviceStatusBar
        • DeviceTabBar
        • DeviceTheme
        • DeviceToolbar
        • MenuItemClickedEventArgs
        • MenuItem
        • MenuItemType
        • AppTheme
        • StatusBarTextColor
        • TabBarItem
        • TabSelectedEventArgs
        • AppTheme
        • ToolbarItem
        • ToolbarItemClickedEventArgs
        • ToolbarItemType
      • Hardware
        • DeviceBatteryInfo
        • DeviceFlashlight
        • BatteryPowerSource
        • BatteryState
        • EnergySaverStatus
        • EnergySaverStatusChangedEventArgs
      • Sharing
        • DeviceClipboard
        • DeviceSharing
      • Communication
        • DeviceContacts
        • DeviceEmail
        • DeviceEmailInfo
        • DeviceSms
        • DeviceSmsInfo
        • Contact
        • EmailMessage
        • SmsMessage
      • Network
        • DeviceNetworkingInfo
        • ConnectionProfile
        • ConnectivityChangedEventArgs
        • NetworkAccess
      • Display
        • DeviceDisplay
        • DeviceScreen
        • DisplayInfo
        • DisplayInfo
        • DisplayInfoChangedEventArgs
        • DisplayOrientation
        • DisplayRotation
        • Orientation
      • Storage
        • DeviceFileSystem
        • DevicePreferences
        • DeviceResources
        • DeviceSecureStorage
        • FileSystemInfo
      • Location
        • DeviceGeolocation
        • DeviceMap
        • AltitudeReferenceSystem
        • DistanceUnits
        • GeolocationAccuracy
        • GeolocationRequest
        • Location
        • Placemark
        • MapLaunchOptions
        • NavigationMode
      • Vibration
        • DeviceHapticFeedback
        • DeviceHapticFeedbackInfo
        • DeviceVibration
      • License
        • DeviceLicenseInfo
      • System
        • DeviceLifecycle
        • DeviceSystemInfo
        • DeviceVersioningInfo
        • AppPackagingModel
        • DeviceIdiom
        • DevicePlatform
        • DeviceType
      • Notifications
        • DeviceLocalNotification
        • DeviceLocalNotificationInfo
      • Logs
        • DeviceLogs
      • Media
        • DeviceMedia
      • Permissions
        • DevicePermissions
        • PermissionStatus
        • PermissionType
      • Sensors
        • DeviceSensorInfo
        • DeviceSensors
        • AccelerometerChangedEventArgs
        • AccelerometerData
        • BarometerChangedEventArgs
        • BarometerData
        • CompassChangedEventArgs
        • CompassData
        • GyroscopeChangedEventArgs
        • GyroscopeData
        • MagnetometerChangedEventArgs
        • MagnetometerData
        • OrientationSensorChangedEventArgs
        • OrientationSensorData
        • SensorChangedEventArgs
        • SensorType
      • Shell
        • DeviceFlyout
        • DeviceTitleBar
        • FlyoutBehavior
        • FlyoutHeaderBehavior
        • FlyoutItem
        • FlyoutItemSelectedEventArgs
      • Speech
        • DeviceSpeech
        • Locale
        • SpeechOptions
      • Converters
        • UnitConverters
    • Architecture
    • Troubleshooting
  • Development
    • Basics
    • Email
    • Haptic Feedback
    • Invoke .NET MAUI Code
    • Invoke Platform Code
    • Launch External Apps
    • License Activation
    • Local Application
    • MacOS Desktop Development
    • Multiple Windows (Desktop)
    • Network Events
    • Notifications
    • Open the Map App
    • Remote Application
    • Shortcuts (App Actions)
    • SVG Images & Icon Packs
    • Unit Converters
    • Updating the App
    • Vibration
  • Android
    • Soft Keyboard
  • Images
    • App Icons
    • Splash Screen
  • Debugging
    • Debugging Overview
    • Dev Tunnels
    • Android
    • iOS
    • Windows
  • REST Web Services
    • Detect network connectivity
    • REST with HttpClient
    • Use platform-specific network features
  • Storage
    • Compare Storage Options
    • Store Data locally with SQLite
  • Extensions
    • Overview
    • Document Scanner
    • Remote Push Notifications
  • Advanced
    • Custom Handler
    • iOS Build Mechanics
    • Multi-Targeting (Hybrid Local)
  • Samples
    • Wisej.NET Features
    • Examples on GitHub
  • Deployment
    • Deployment Overview
    • Deployment Guide
  • Application Profiling
    • Android
    • iOS / macOS
    • Windows
Powered by GitBook
On this page
  • General Architecture
  • Application Layer
  • Wisej.NET Framework
  • Embedded WebView (.NET MAUI App)
  • Request Manager
  • Handlers
  • .NET Android, .NET iOS, and WinUI
  • Hybrid Local Architecture
  • Hybrid Remote Architecture
  1. Start

Architecture

PreviousUnitConvertersNextTroubleshooting

Last updated 1 year ago

General Architecture

Wisej.NET Hybrid applications are built with two components: a client-side .NET MAUI application and a corresponding server application.

Depending on the Hybrid mode selected, the server layer may be located either on the device using EmbedIO as an embedded web server or deployed as a remote ASP.NET / ASP.NET Core web application to Azure or AWS.

Application Layer

The application layer is the part of the application that developers interact with. Developers can build user interfaces, implement business logic, and interact with the client device using the Device static class.

Wisej.NET Framework

The application layer is built on top of Wisej.NET. Wisej.NET is a collection of tools and integrations for building complex web-based user-interfaces.

Wisej.NET is able to post and receive messages directly to the client browser using WebSocket and JavaScript to perform real-time browser updates and interact with the Hybrid Client device's embedded web browser.

Embedded WebView (.NET MAUI App)

The embedded WebView used in Wisej.NET Hybrid applications registers a JavaScript bridge to post and receive messages in native code.

The WebView implementation for each platform:

Request Manager

When the Hybrid Client application starts up, it builds an internal collection of request handlers that can be used to process requests. Request handlers can be dynamically added at any point in time.

Once a message is received from the embedded WebView, the request is delegated to the specific handler for processing.

Handlers

All Device integrations have a corresponding client-side request handler that processes requests from the server. The handler may perform an action with or without a result to return to the server. It may also begin firing periodic events to the server, as is the case for receiving accelerometer updates.

In the example above, the request from Device.Flashlight.TurnOn() in the application layer is delegated to the corresponding client-side Flashlight handler.

.NET Android, .NET iOS, and WinUI

Each request that comes in through the embedded WebView is delegated to a specific platform handler.

In the flashlight example above, the requests are delegated as follows:

Android

API level 23 and higher

API level 22 and lower

A camera surface texture is created to turn on or off the FlashMode of the camera unit.

iOS

The AVCaptureDevice API is used to turn on and off the Torch and Flash mode of the device.

Windows

Hybrid Local Architecture

Wisej.NET Hybrid Local applications can run entirely on the device without any need for an internet connection. The Server component in the diagram below uses an embedded web server to host the Wisej.NET application.

Hybrid Remote Architecture

Wisej.NET Hybrid remote applications can be used to interact with device features while running the application on a remote web server. The Hybrid Client can configure the startup URL to point to this endpoint.

Android:

iOS / Mac:

Windows:

On newer API levels, will be used to turn on or off the flash unit of the device.

The API is used to turn on or off the first detected lamp on the back of the device.

WebView
WKWebView
WebView2
Torch Mode
Lamp
LogoIntroductionWisej
Wisej.NET Hybrid Example Architecture (Flashlight Integration)
Wisej.NET hybrid Local Architecture Example (Flashlight Integration)
Wisej.NET Hybrid Remote Architecture Example (Flashlight Integration)