Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created April 9, 2018 03:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/e9deed156fb773482095c6e720fc4f96 to your computer and use it in GitHub Desktop.
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
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