How To Run Windows 10 Universal App In Windows 10 Device

Prerequisites
  • Visual Studio 2015 update 3
  • Windows 10 Mobile or Emulator 
Introduction 
 
Windows 10 is a personal computer operating system, developed and released by Microsoft as a part of the Windows NT family of operating systems. It was officially unveiled in September 2014, following a brief demo at Build 2014. The first version of the operating system entered a public beta testing process in October 2014, leading up to its consumer release on July 29, 2015.
 
Cortana is available in Windows phone 10. Windows phone 10 has good UI design.
 
Windows 10 Universal Platform
 
Windows 10 introduces the Universal Windows Platform (UWP), which further evolves Windows Runtime model and brings it into Windows 10 unified core. As a part of core, the UWP now provides a common app platform, available on every device, which runs Windows 10. With this evolution, apps that target the UWP can call not only WinRT APIs, which are common to all the  devices, but also APIs (including Win32 and .NET APIs), which are specific to the device family; the app is running on. The UWP provides a guaranteed core API layer across the devices. This means you can create a single app package, which can be installed onto a wide range of devices. With this single app package, Windows Store provides a unified distribution channel to reach all the device types your app can run on.

In Windows, Universal app runs all Windows devices (ex: Hololense, IoT, device, local machine, Xbox).
 
Windows 10 Universal Platform
 
We can learn, how to run Windows 10 universal app in your Windows 10 mobile. The following steps are required to be followed:
 
Step 1: Go to Visual Studio 2015 update 3.
 
Open Visual Studio New-->New project -->select Visual C# --->select Windows -->Universal -->select Blank Windows Universal App and give your app; a name (ex: sample).
 
In the blank Windows universal app, you can develop any type of app in Windows, Mobile app, Windows app, Hololense and IoT. This is the feature of Windows Universal app. In Visual Studio 2015 update 3, it is shown below: 

Blank Windows Universal App 
 
Step 2: Next step is to select the target version of Windows 10 SDK (Windows 10 Build 10240). This version supports new Visual Studio update 3. It supports Windows 10 universal app development.
 
Select the versions, because Windows 10 SDK supports the upgrade version only.
  • Minimum version Windows 10 build 10240.
  • Maximum version Windows 10 build 10240. 
Next, select OK button.

version 
 
Step 3: Next step is to write the code or design in your app.
 
Next, go to Solution Explorer. Solution Explorer has all app pages available and all the sources will be there. (Ex: images, files, all Xaml files).
 
Next, go the MainPage.xaml and subsequently, go to Designing the UI page (user interface). Double click to open the MainPage.xaml. It will open, after you design the UI.

MainPage 
 
Step 4: After opening the MainPage.xaml, you will go to the tool box Window. In the tool box Window , it has many types of tools, available in the tool box Window (for ex: text box, radio button, label, image box, scroll bar). Select TextBlock in the text block and it is called the label; in the label, write text multi line and show the text to use the TextBlock in Windows universal. Name it as a TextBlock. Drag and drop the TextBlock in MainPage.xaml. It will automatically come to MainPage.xaml. 
 
MainPage
 
Step 5: After dragging and dropping of the TextBlock in your main page.Xaml, you will edit the TextBlock text. You can go to the Properties Window. In the Properties Window, there are available properties of the TextBlock, Also, all the tool properties will be there. Properties Window will help to edit your TextBlock or other components. Next, you will replace the text of TextBlock (Ex:Hello world).
 
It automatically changes MainPage.xaml.

MainPage 
 
Code For TextBlock
 
In this, code edits or replaces the TextBlock text constant (Ex:Hello World).
  1. <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">  
  2.     <TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="144,315,0,0" TextWrapping="Wrap" Text="Hello World " VerticalAlignment="Top" />   
  3. </Grid>   
Step 6: Next step is to run your app.
 
You can go to run your app from the local machine, because your app runs without internal error checking. If your app is without an error, you skip to this step. In this run mode, many types of run devices are available(Ex: local machine,Device(mobile), Hololense emulator, simulator, remote machine), if you want to run the selected device (Ex: local machine).

local machine 
 
Output (Local Machine)
 
Your app output will show your local machine. It will tack some time, because your app is built the first time, so it will take some time.

local machine
 
 
Step 7: This step is about, how to run your app in your device Windows 10 mobile or create an emulator to run the app. Your system and mobile will change the Developer mode. In the Developer mode, change after run only, running your app.
 
First your system change Developer Mode.
 
Go to the settings. In the settings, the panel has all the settings for the computer.

You can search the settings or go manually. Go to Update&Security in the settings, which have the developer mode. Thus, you will go to the Update&Security.

Mode 

Step 8: Afterwards, go to Update & Security. In these settings, click  developer Menu. In this menu, go for the developer mode. You will choose the developer mode and set the developer mode.
In this part, there are many modes (Windows store apps, sideload apps, developer mode) default mode Windows store apps mode and you can change Windows developer mode.

In the developer mode, install the signed app and developer features you will use.

features

Step 9: It take some time, as it will change the developer mode, because your system will change the developer mode. If you turn on Windows developer mode it is downloaded from the store, after changing the system developer mode. in the developer mode, run your app in your system and mobile. Now, select OK to turn on Windows developer mode. 

mode 
 
Step 10: It takes some time to change Windows developer mode. This mode changes, after you run your app. 

developer mode 
 
Step 11:
 
In this step, change the developer mode in your device. Your device also changes the developer mode. If you do not change the developer mode, your app does not run the app and a run error will be shown. Thus, you can change your mobile developer mode. If you have  an emulator, you choose an emulator to run your app. If you don't have your mobile, it will change the developer mode.
 
Go to the settings which are similar to the mobile and system. In the settings, Windows has the all settings in your phone. Next, go to Update & Security, if you select the setting. It has the developer mode.

Update&Security 

Step 12: Update&Security has the Developer mode and find the phone Backup settings. Afterwards, go to the For Developers in the for developer menu, which has the developer mode. Hence, you will go to the "for developer smenu".
 
Update&Security
 
Step 13:
 
After selecting the "for developers menu", this menu has many types of modes in your mobile (Windows store apps ,sideload apps, developer mode) default mode Windows store apps mode, where you can change Windows developer mode. In the developer mode, it is enabled, after you go to run your app .
 
Now, choose Developer Mode in the developer mode to install the feature and download the store and it will change automatically. You will change the Developer mode, after you go to run your app.
 
Update&Security
 
Step 14: 
 
Your device connects via data cable. If your mobile does not connect, error will be shown and your mobile will connect in the device mode, which will enable the Green color.  

After changing the developer mode in your mobile and system, you go to run your app in Visual Studio. Choose the run mode in the device, as it is connected in the device mode, which is Green. If you don't have mobile, choose the emulator.
 
It will take some time, because your app will build in your mobile. Afterwards your app will run your mobile and will be installed on your mobile.

device
 
Summary: In this article, we learned how to run Windows Universal app in your mobile or Windows 10 mobile emulator, using Visual Studio update 3.

Up Next
    Ebook Download
    View all
    Learn
    View all