Windows 8 Consumer Preview and Visual Studio 11 Beta – Process Lifetime Management (Part 11/11)

February 29, 2012

Windows 8 Metro applications introduces new (for desktop version of Windows) philosophy behind application execution - when application runs and when it is terminated. In this post I will overview this process also known as Process Lifetime Management (or PLM in short). In addition, I will showcase creation of custom Splash Screen experience which becomes important especially with in PLM in mind. Windows 8 designed to run not only on desktop PCs and laptops (which usually have descent amount of RAM and CPU resources), but also on tablets and low-powered PCs (with limited amount or RAM, slower CPU and usually...

Windows 8 Consumer Preview and Visual Studio 11 Beta – Live tiles, toasts, badges and Push Notifications (Part 10/11)

Windows 8 provides interesting way to “interact” with user even when application is not active anymore.   Push Notifications Windows Push Notifications (WNS) in Windows 8 is quite similar to the Windows Phone 7 Push Notification (MPNS) model. It uses cloud-based push notification services to deliver notifications to registered clients. To enable application receiving push notifications developer must register it at Windows Push Notifications & Live Connect site. The process is very simple – developer provides Package display name and publisher found in application manifest: and site provides with updated package...

Windows 8 Consumer Preview and Visual Studio 11 Beta – Show Message Dialogs and Popup Menus (Part 9/11)

This post is about popups. Why popups? Who need them? Popups needed to present some important info to the user in modal way or to present some overlays above other screen elements. Lets start from Message Box. WinRT lacks MessageBox support in classic understanding or this UI element. While showing classic dialog box over Metro application is definitely possible from technical point of view (see screenshots in the post about In-App purchases), it completely destroys Metro look and feel of the application. For this reason WinRT provides MessageDialog class in Windows.UI.Popups namespace....

Windows 8 Consumer Preview and Visual Studio 11 Beta – Quick tip: using location services (Part 8/11)

In this short post I will show how to use location services in you app. Working with location services requires declaring Location capability in application manifest: The location services provides access to location functionality, such as cell triangulations, WiFi (through IP address), and GPS. Also great many modern devices supports resolving location in some way from mentioned before, application must handle the case where location services cannot resolve the location or user has disabled location services from the Control Panel. The location service accessed through Windows.Devices.Geolocation namespace. Geolocator class responsible for resolving the location and...
no comments

Windows 8 Consumer Preview and Visual Studio 11 Beta – Licensing and In-app purchases (Part 7/11)

Windows 8 Metro applications are distributed by Windows Store. The store handles all installation tasks, updating to the new versions when published by developer. Also it handles purchasing the application, supporting trial mode (if application developer chooses to support it) and handles in-app purchases. All licensing supported by Windows.ApplicationModel.Store namespace. Note: CurrentApp provides license information for the current app.This object obtains its data from the Windows Store, which is not currently (Consumer Preview timeframe) supported. For development purposes we will use CurrentAppSimulator class, which completely mimics APIs of CurrentApp class but enables developing licensing...

Windows 8 Consumer Preview and Visual Studio 11 Beta – Quick tip: using sensors (Part 6/11)

Windows 8 supports multiple sensors. Some of them could be installed on your device, some of them not. When I planned this series, I had pretty hard choice to make about the sensor – which one to use. Accelerometer/Gyrometer/Compass/Inclinometer/Orientation are cool sensors, but their usage pretty tightly bound to specific scenarios like games (Accelerometer/Gyrometer/Inclinometer), some location aware applications (Compass) or at least orientation-aware apps (Orientation). I had to make a choice either create simple “show-the-values” boring sample or game which using those sensors (at least some of them) or showcase go with non-standard approach presenting LightSensor which...

Windows 8 Consumer Preview and Visual Studio 11 Beta – Local and Roaming application data storage (Part 5/11)

In previous post (Settings – LINK) I explained how to create application’s settings screed and customize it with application specific UI and data. In this post I will explain how to preserve application settings and other application data. Wind8 CP enables few locations to store application data. Application can use temporary directory to save any kind of information which was possible also before Windows 8. In addition WinRT provides native support saving data in application’s data store as collection of Key Value Pairs. This data can be stored locally or using roaming store. Roaming store will be synchronized...

Windows 8 Consumer Preview and Visual dStudio 11 Beta – Customizing Settings Charm (Part 4/11)

Before Windows 8 every application invented its own way to present application settings. Here are very few of them: Some apps even provided standalone applications to manage settings. Also from settings storage perspective every developer had to decide when, where and how those settings are saved and in some cases synchronized between different user’s machines. With Windows 8 Metro applications most of those questions and hard choices are gone. Every Metro application can use system-wide standard way to present settings and collect them in predictable and system-standard way. Windows 8 provides “Settings” charm...

Windows 8 Consumer Preview and Visual Studio 11 Beta – Data Sharing (Part 3/11)

Windows 8 enables data exchange between applications. This was possible in the past, but to make it happen two applications must have knowledge about each other which was always not possible especially for applications developed by different companies. Windows 8 enables easy data sharing between the application by introducing OS-level sharing mechanism. Metro applications can publish information from certain types (“Share Source” applications) from one hand, operation system is responsible of selecting applications which expressed “interest” in some specific type of info and those applications (“Share Target”) are responsible of processing data received upon activation. In this post I will...

Windows 8 Consumer Preview and Visual Studio 11 Beta – Working with Proximity Device (Part 2/11)

This post is about proximity devices and scenarios enabled by using this functionality. WinRT supports Near Field Communication (NFC) scenarios by providing native support using Windows.Networking.Proximity namespace. This namespace enable working with proximity device in two different modes – direct communication using sockets (ProximityStreamSocket class) and publish/subscribe mode (using ProximityMessage class). ProximityDevice class provides gateway to hardware NFC device component (if present in computer/tablet, drivers are installed and user permits using such type of devices). To use Proximity device it must be manifested in Capabilities section of application manifest: In both cases first...