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
  • Constructors
  • DeviceSensors()
  • Methods
  • IsMonitoring(type)
  • IsSupported(type)
  • Start(type)
  • Stop(type)
  • Events
  • AccelerometerChanged
  • BarometerChanged
  • CompassChanged
  • GyroscopeChanged
  • MagnetometerChanged
  • OrientationSensorChanged
  • ReadingChanged
  • Shake
  1. Start
  2. API
  3. Sensors

DeviceSensors

Wisej.Hybrid.DeviceSensors

PreviousDeviceSensorInfoNextAccelerometerChangedEventArgs

Last updated 1 year ago

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid (3.5.0.0)

Provides integrations to interact with device sensors.

public class DeviceSensors
Public Class DeviceSensors

Access this class through the Device singleton.

Constructors

DeviceSensors()

Initializes a new instance of DeviceSensors and attaches to sensor events.

Methods

IsMonitoring(type)

Gets whether the given SensorType is available for monitoring on the hybrid device.

Parameter
Type
Description

type

The type of sensor.

Returns: Boolean. True if the given SensorType is available for monitoring.

IsSupported(type)

Gets whether the given SensorType is supported on the hybrid device.

Parameter
Type
Description

type

The type of sensor.

Returns: Boolean. True if the given SensorType is supported.

Starts monitoring the given SensorType on the hybrid device.

Parameter
Type
Description

type

The type of sensor.

Stops monitoring the given SensorType on the hybrid device.

Parameter
Type
Description

type

The type of sensor.

Events

EventHandler<AccelerometerChangedEventArgs> Occurs when accelerometer reading changes.

EventHandler<BarometerChangedEventArgs> Occurs when barometer reading changes.

EventHandler<CompassChangedEventArgs> Occurs when compass reading changes.

EventHandler<GyroscopeChangedEventArgs> Occurs when gyroscope reading changes.

EventHandler<MagnetometerChangedEventArgs> Occurs when magnetometer reading changes.

EventHandler<OrientationSensorChangedEventArgs> Occurs when the orientation sensor reading changes.

EventHandler Occurs when the device is shaken.

Start(type)

Stop(type)

AccelerometerChanged

BarometerChanged

CompassChanged

GyroscopeChanged

MagnetometerChanged

OrientationSensorChanged

ReadingChanged

Deprecated: This event will be removed in future releases in favor of sensor-specific events. EventHandler<SensorChangedEventArgs> Fires when a sensor's reading changes.

Shake

SensorType
SensorType
SensorType
SensorType