Showing posts with label device family. Show all posts
Showing posts with label device family. Show all posts

Wednesday, July 4, 2018

UWP: Is there a way to find the device to which you are deploying a UWP Project?

You can find this information using the Windows.System as shown here:

Device_000

We can find the device to which the UWP is deployed using the above information.

Here is a Blank UWP Project's MainPage.xaml.

Device_0
I have a button and a text box. Button's click event finds the device information and writes to the text box using the click event shown here:

Device_00

When deployed to the machine (Windows 10 Pro Desktop), the response is as shown.

Device4.jpg

When deployed to an emulator:

The display shows the device info:


You can get the DeviceFamilyVersion as well. The code is inside the image.

On the emulator this is displayed.







Monday, October 3, 2016

What is Windows Device family?

Windows evolved from just windows to include 'phones'.

When Windows 8.1 was introduced Windows Runtime(WinRT) which was evolution of Windows app model came up with the Universal Windows 8 apps for both Windows and Windows Phone. Windows and Windows Phone shared a ccommon piece of code.

Universal Windows Platform was introduced beginning Windows 10. The target was no more the Windows OS or Windows Phone OS but a common platform with a unified core. This core runs on all devices in the Windows family.

Devices running this core can target can not only call WinRT APIs that are common to all devices but also Win32 and .NET APIs that are specific to device family. This means all you need to develop is a single app package that can be installed on a wide variety of devices shown here.

UWP_00.PNG

On any device, you have therefore, the guaranteed core and you add APIs on top of it specific to the device. You will conditionally access the device specific features in your code.

Here is the present line up of the device family.

UWP_01.PNG

Here is a Video from Microsoft's Channel 9 with additional information:



Monday, October 12, 2015

What is Universal Windows Platform?

You will be hearing about this more and more as Windows 10 devices start appearing in increasing numbers that may reach billions.


Before Windows 10, the OS was Windows 8.1 and there were two devices
that were targeted by code:
  • Windows
  • Windows Phone
Developers created Universal Windows 8 apps using a shared codebase. For
this the Windows Runtime (WinRT), an evolution of the Windows app model
was introduced as a common application architecture.

With Windows 10 that has changed. Now there are a number of devices for
which you need to code has increased. Hence Universal Windows Platform
(UWP) was born.

WinRT gets evolved to be integrated with Windows 10 Core. This core
provides a common platform for every device that runs Window 10. UWP now
calls WinRT common for all the devices PLUS also APIs(Win32 and .NET)
that are specific to the device family the app runs on. Thus UWP
provides a guaranteed core API layer for all devices.

What it means is that your can be deployed to the device type you are
using. All devices use the same runtime but have their own unique API determined by the device type. The code access for those unique APIs specific to the device are conditional.

Note: Images are from Microsoft Site.