January 13, 2020

Xamarin.Essentials: Device Info In Android Using Xamarin.Forms

Introduction

Step 1

Open Visual Studio →Click File → select New → select Project. →Cross-Platform →Blank App →Shared Project →then give your project a name and location and click the “OK” button.

Step 2

Right, Click on Solution(App_Name) →Manage NuGet Packages for Solution →Install Xam.Plugin.DeviceInfo package.

Step 3

We are creating Labels, texts, and font attributes inside the layout. like “ID”, “IDIOM”, “MODEL”, “PLATFORM”, “VERSION”.

Step 4

This code is for Deviceinfo Plugin using Id, idiom, model, and platform, version

Idioms

  • DeviceIdiom.Tablet — Tablet
  • DeviceIdiom.Desktop — Desktop
  • DeviceIdiom.TV — TV
  • DeviceIdiom.Watch — Watch
  • DeviceIdiom.Unknown — Unknown
 
 

Step 5

Next, select the Built & Deploy.

Leave a Reply

Your email address will not be published. Required fields are marked *