Created
April 9, 2018 03:14
-
-
Save juucustodio/e9deed156fb773482095c6e720fc4f96 to your computer and use it in GitHub Desktop.
Example of how to get informations from device in Xamarin.Forms applications - http://julianocustodio.com/DeviceInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Plugin.DeviceInfo; | |
using Xamarin.Forms; | |
namespace DemoDeviceInfo | |
{ | |
public partial class MainPage : ContentPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
DeviceName.Text = "DeviceName: " + CrossDeviceInfo.Current.DeviceName; | |
Id.Text = "Id: " + CrossDeviceInfo.Current.Id; | |
Manufacturer.Text = "Manufacturer: " + CrossDeviceInfo.Current.Manufacturer; | |
Model.Text = "Model: " + CrossDeviceInfo.Current.Model; | |
Version.Text = "Version: " + CrossDeviceInfo.Current.Version; | |
Platform.Text = "Platform: " + CrossDeviceInfo.Current.Platform.ToString(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment