Вы также можете использовать Xam.Plugin.DeviceInfo
.
Xam.Plugin.DeviceInfo
: https://www.nuget.org/packages/Xam.Plugin.DeviceInfo
Код: In App.cs
// The root page of your application
MainPage = new ContentPage
{
Content = new StackLayout
{
Padding = 50,
VerticalOptions = LayoutOptions.Center,
Children = {
new Label{ Text = "Id: " + CrossDeviceInfo.Current.Id},
new Label{ Text = "Model: " + CrossDeviceInfo.Current.Model},
new Label{ Text = "Platform: " + CrossDeviceInfo.Current.Platform},
new Label{ Text = "Version: " + CrossDeviceInfo.Current.Version},
}
}
};
![enter image description here](https://i.stack.imgur.com/r0o7g.png)
Вы можете скачать исходный код по ссылке для справки. https://github.com/jamesmontemagno/DeviceInfoPlugin