New post for Windows 10 and Raspberry Pi 2 series
- Hardware and software (1 on N)
- Boot from SD card in the device (2 of N)
- Hello World mode! (3 of N)
- Visual Studio deployment process and Web Management app (4 on N)
- Hello Blinky !!! (5 on N)
- Some admin tasks, like change password and change name (6 on N)
- List of connected devices in the Raspberry Pi 2 (7 on N)
- Deploy an app using the deploy package (8 on N)
- Different behaviors for an App based on the app architecture
If you’re an old school developer when you find a change one of the oldest APIs, for sure you’ll suffer a heart attack. That’s what happened with the classical System.Environment. The following image shows the difference that we have between a classic WPF app with .net 4.5 and a Universal App for Windows 10.
Now a Universal App will execute in a controlled environment (Sandbox), whether on a laptop, a smartphone or a device. This implies that the app capabilities are tied to this Sandbox. For example, what formerly used to get from the Environment, now perhaps we must look for it in the Package of the application. The architecture of the processor is an example, and the following code shows an example to validate if the app is running on an ARM processor.
While the idea behind Universal Apps is to have the maximum code unified for all platforms, should take into account the capabilities of each platform. For example, in ARM we don’t have the possibility to use MessageDialogs so if we want to show a message we have to do a bit of defensive programming .
This allows us to display a message in the mode dialog on a laptop or tablet
And for the case of ARM, the message in a TextBlock as part of the app.
The sample code on github
Saludos @ Madrid