コード例 #1
0
ファイル: DeviceInfo.tizen.cs プロジェクト: zhamppx97/maui
        static DeviceIdiom GetIdiom()
        {
            var profile = Plat.GetFeatureInfo("profile")?.ToUpperInvariant();

            if (profile == null)
            {
                return(DeviceIdiom.Unknown);
            }

            if (profile.StartsWith("M"))
            {
                return(DeviceIdiom.Phone);
            }
            else if (profile.StartsWith("W"))
            {
                return(DeviceIdiom.Watch);
            }
            else if (profile.StartsWith("T"))
            {
                return(DeviceIdiom.TV);
            }
            else
            {
                return(DeviceIdiom.Unknown);
            }
        }
コード例 #2
0
ファイル: DeviceInfo.tizen.cs プロジェクト: zhamppx97/maui
        static DeviceType GetDeviceType()
        {
            var arch  = Plat.GetFeatureInfo("platform.core.cpu.arch");
            var armv7 = Plat.GetFeatureInfo <bool>("platform.core.cpu.arch.armv7");
            var x86   = Plat.GetFeatureInfo <bool>("platform.core.cpu.arch.x86");

            if (arch != null && arch.Equals("armv7") && armv7 && !x86)
            {
                return(DeviceType.Physical);
            }
            else if (arch != null && arch.Equals("x86") && !armv7 && x86)
            {
                return(DeviceType.Virtual);
            }
            else
            {
                return(DeviceType.Unknown);
            }
        }
コード例 #3
0
ファイル: DeviceInfo.tizen.cs プロジェクト: zhamppx97/maui
 static string GetManufacturer()
 => Plat.GetSystemInfo("manufacturer");
コード例 #4
0
ファイル: DeviceInfo.tizen.cs プロジェクト: zhamppx97/maui
 static string GetModel()
 => Plat.GetSystemInfo("model_name");
コード例 #5
0
ファイル: DeviceInfo.tizen.cs プロジェクト: zhamppx97/maui
 static string GetVersionString()
 => Plat.GetFeatureInfo("platform.version");
コード例 #6
0
ファイル: DeviceInfo.tizen.cs プロジェクト: zhamppx97/maui
 static string GetDeviceName()
 => Plat.GetSystemInfo("device_name");