getosinfo 1.3.0
See the version list below for details.
dotnet add package getosinfo --version 1.3.0
NuGet\Install-Package getosinfo -Version 1.3.0
<PackageReference Include="getosinfo" Version="1.3.0" />
paket add getosinfo --version 1.3.0
#r "nuget: getosinfo, 1.3.0"
// Install getosinfo as a Cake Addin #addin nuget:?package=getosinfo&version=1.3.0 // Install getosinfo as a Cake Tool #tool nuget:?package=getosinfo&version=1.3.0
getosinfo
getosinfo is a simple libary that you can use to get a device's os informaion (platform, manufacturer, name .etc)
DOCS
getting basic info
Add a reference to GetOsinfo in your class:
using GetOsinfo;
// Device Model (SMG-950U, iPhone12)
var device = Osinfo.Model;
// Manufacturer (Samsung)
var manufacturer = Osinfo.Manufacturer;
// Device Name (Jon's iPhone)
var deviceName = Osinfo.Name;
// Operating System Version Number (12.0)
var version = Osinfo.Version;
// Platform (Android)
var platform = Osinfo.Platform;
// Idiom (Phone)
var idiom = Osinfo.Idiom;
// Device Type (Physical)
var deviceType = Osinfo.DeviceType;
getting os type (Desktop or Mobile)
simply use Osinfo.GetOSPlatformType(OsTypes.Desktop)
<br>
you can also check for specific platforms with these:
OsTypes.Android;
OsTypes.iOS;
OsTypes.Windows;
OsTypes.Linux;
OsTypes.MacOS;
OsTypes.Mobile;
OsTypes.Desktop;
Idiom
OsIdiom.Idiom correlates a constant string that maps to the type of device the application is running on. The values can be checked with the OsIdiom struct:
OsIdiom.Phone � Phone
OsIdiom.Tablet � Tablet
OsIdiom.Desktop � Desktop
OsIdiom.TV � TV
OsIdiom.Watch � Watch
OsIdiom.Unknown � Unknown
Device Type
Osinfo.DeviceType correlates an enumeration to determine if the application is running on a physical or virtual device. A virtual device is a simulator or emulator.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Xamarin.Essentials (>= 1.7.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.