|By Jim O'Neil||
|August 6, 2012 08:07 AM EDT||
In the last post, I discussed the structure of a notification template and the mechanics for providing the various bit of information in that template. As you know, many of the notification templates can include one or more images, and that brings up a host of configuration options that I didn’t have a chance to get into last time. This post will fill in the gaps and provide insight into three main topics:
I’ll close with a quick list of not-so-obvious features and behaviors that will hopefully save you some time as you plan out your strategy for supporting images as part of notifications used within your application.
There are two overarching constraints for images used within notifications:
- Images used in notifications must be in one of three formats: .png, .jpg/.jpeg, or .gif, and the format must match the extension.
- Images for notifications must be no larger than 200 KB and 1024 x 1024 in dimension.
Beyond that and depending on the device size and characteristics, images within Windows 8 may be scaled to one of four proportions (80%, 100%, 140% and 180%). Since the notification image formats supported are all raster formats (versus vector-based) you cannot rely on the scaling to result in clear, crisp imagery, so it’s recommended that you provide artwork to accommodate all four scaling factors.
The table below (which is adapted from the App images topic on MSDN) shows most of the sizes [see note] needed for tile and toast notifications as well as the (optional) badge logo for the start screen. Only those images highlighted in red (100% size for logo and small logo) are required and must be supplied in the app manifest (as .jpg/jpeg or .png formats [see note]). Other sizes are optional and if not provided will be generated by scaling the default 100% image.
appxmanifest Image Name
80% [see note] 100% 140% 180% Logo
(default square tile)
120x120 150x150 210x210 270x270 Small logo
(tile under semantic zoom,
tile and toast branding) [see note]
24x24 30x30 42x42 54x54 Wide logo
(default wide tile)
248x120 310x150 434x210 558x270 Badge Logo [see note]
24x24 33x33 43x43
Images used for notifications can be stored in one of three places:
- within the app package, using the
ms-appx:///prefix to a directory in your deployed application (this is the default).
- within local storage, using the
ms-appdata:///localprefix to a directory within local storage. Note that images in temporary and roaming application data storage cannot be used.
- on the web, using an
httpsURI that serves up image content (this requires that the application declare Internet client capability in its manifest).
Within the template XML you can specify the entire image URI or use paths relative to the baseUri value specified within the template. The baseUri can be set for either the visual (tile | toast) tag or the binding tag (tile | toast), with the latter overriding the former when provided.
App Package Images
Here, for example, is a code snippet from the App tiles and badges sample showing the use of an image within the local application package:
var tileXml = Windows.UI.Notifications.TileUpdateManager.getTemplateContent( Windows.UI.Notifications.TileTemplateType.tileWideImageAndText01); // get the text attributes for this template and fill them in var tileTextAttributes = tileXml.getElementsByTagName("text"); tileTextAttributes.appendChild(tileXml.createTextNode( "This tile notification uses ms-appx images")); // get the image attributes for this template and fill them in var tileImageAttributes = tileXml.getElementsByTagName("image"); tileImageAttributes.setAttribute("src", "ms-appx:///images/redWide.png");
Local Storage Images
The code for accessing an image in local storage is very similar, differing only by the addressing scheme:
Here the image is located in a subdirectory called images at the location returned by ApplicationData.localFolder; when I ran an excursion of the sample app using this access mechanism, the image was served from:
Images in the Cloud
One option to consider when architecting your application is leveraging the cloud for external resources that your application uses. If you place images and other content on the web or in the cloud, you’ve decoupled those resources from your application, and by doing so you can freshen the look and feel of your application without publishing a new version of your application or requiring the end users to get an update.
Windows Azure, Microsoft’s public cloud offering, can be an incredibly convenient and cost effective way to manage the images you’re using for your notifications. The easiest way to serve image content from Windows Azure is via blob storage which provides highly scalable and highly available storage of unstructured data at one of eight Windows Azure data centers worldwide. A Content Delivery Network (currently comprising 24 nodes) is also available to improve performance and user experience for end-users who aren’t located near a data center.Keep in mind there are some caveats when using cloud or web hosted images:
- The most obvious is that if the machine lacks network connectivity, the image won't be available and the notification will not be sent.
- Web images are cached, so an update to the image in the cloud may not be immediately reflected on the client. If the cache is full, images will be removed in a policy opaque to the developer. Additionally the system will clear the cache when
- The application is uninstalled, or
- The user clears personal information from all of her application tiles (via the Settings flyout on the Start screen).
The system will comply with caching and expiration headers in the HTTP response. Those headers are not configurable in Windows Azure storage alone, but a web service can be configured and hosted on Windows Azure to support this.
- The cloud isn't free! While there are no-cost options (like the 90-day trial and MSDN subscriptions), you ultimately may end up paying for the storage and the transactions (HTTP GET requests) that are made by your application. The complete pricing details are available at the Azure pricing page, but it’s very likely you'll be able to support a popular Windows 8 application for dollars if not pennies a month.
The elephant in the room thus far in this post is that all the samples I’ve shown above refer to a single image of some unknown size, and I appear to have ignored the advice to provide four different image sizes (80%, 100%, 140% and 180%) scale to provide the best user experience!
It turns out that there’s a bit of magic happening behind the scenes to make managing the combination of image sizes and contrast mode (don’t forget there’s are high-contrast white and high-contrast black options too!). The amount of ‘magic’ depends on the image source, so I’ll cover them independently below.
App Package Images
When you provide images as part of your application package, a naming convention can be leveraged which enables you to specify one base image name (say in the notification template image src attribute) yet the system automatically selects a file with a modified name based on the current scale factor and contrast mode.
For instance, while the code sample above refers to
redWide.png, the application can deliver a slew of versions that vary by scale factor, contrast mode, culture (e.g., en-US versus zh-CN), and several other resource qualifiers.
A file named
redWide.scale-140.png, if available, would be used in the samples above – in lieu of scaling the default image – whenever there was a request for
redWide.pngand the current scale required was 140%. Your code doesn’t need to do a thing!
If you had a special version of the tile just for those in French locales, you could name that image,
redWide.lang-FR-fr_scale-140.png. (Note the lang prefix to the BCP-47 language identifier)
redWide.scale-180_contrast-black.pngwould be used when the contrast mode is black and an image scaled to 180% is needed. By the way,
You can also arrange the images in subdirectories, to provide a myriad of customization options. Take, for example, the following directory structure.
If the application were run on a US based system, but the user selected a black high contrast theme, a reference for
welcome.png for a tile notification on a typical laptop would pick the variant on Line 8. Someone running the applications with his locale set to Japan on a high-resolution device would see the image file associated with Line 17.
Unfortunately, none of the conventions supported for app package images are supported when using local images (the
ms-appdata:///local namespace), but you could implement similar semantics programmatically using the following Windows APIs:
|Attribute||Windows Class or Property||Values|
|Language||ApplicationLanguage.languages||a list of BCP-47 codes corresponding to the applications supported languages (see ���How to manage language and region” for details)|
|Contrast Scheme [see note]||AccessibilitySettings.highContrast
”High Contrast White”
”High Contrast Black”
”High Contrast #1”
”High Contrast #2”
|Home Region||GlobalizationPreferences.homeGeographicRegion||BCP-47 subtag code corresponding to user’s Region preference in Control Panel|
Images in the Cloud
Both the tile schema and the toast schema include an optional attribute called addImageQuery, on the visual, binding, and image elements (the value set on the deepest element overriding those above it). When addImageQuery is set to true, HTTP/HTTPS requests made for images will have a query string appended consisting of the following three name value pairs:
|Attribute||Query String Name||Query String Value|
|Contrast Scheme [see note]||
Here for instance is an HTTP request made for the
The good news is that you don’t have to figure out which variant of an image is being requested – that information is available in the query parameters; the bad news is that you have to build your own web service to inspect those parameters and serve up the correct image in response. You can’t just use the blob storage mechanism shown above, because those query parameters aren't automatically interpreted by Windows Azure blob storage, but you can still use Windows Azure with a little bit of code (PHP, ASP.NET, Node.js, or essentially any implementation of a web service that will run on Windows).
- 80% images are used on tiles for some combinations of screen size and resolution.
- Size specifications haven’t been published for images that appear on toast or that do not fill the entire tile, such as the template samples below. In most cases, these will be photographic images which scale fairly well (using the Fant algorithm internally). You could measure the sizes empirically, but if you create images that work for 180% scale they should also scale down well for the other three factors.
- Default images (those declared in your app manifest) must be .png or .jpg/.jpeg format, but you can use .gif in your toast and tile notification templates.
- If an image is of the wrong format or not available (such as a image hosted on the Web when the client is not connected), the notification will not be sent.
- The branding element is taken from the small logo in your manifest. For tiles it appears in the bottom left and for toast in the bottom right. In the tile schema you can use text, logo, or no branding; in the toast schema, the branding attribute is not used and you will always see the logo.
- The badge logo must be monochromatic.
- if you don’t supply multiple images to accommodate scaling, try to create images with dimensions that are a multiple of 5 as they won’t experience pixel shifting during scaling.
- The Visual Studio simulator is an awesome way to test out tile behavior under different resolutions and contrast modes, but be aware, you’ll have to restart your debug session in the simulator if your change in resolution results in loading a different version of the image.
- PC Settings > Ease of Access (accessible via the Settings charm) includes a switch to toggle High Contrast mode; however, since there are four high contrast modes, you’ll need to use the desktop Control Panel option to pick one. Once you’ve selected the contrast mode there, PC Settings > Ease of Access will use that High Contrast mode when you toggle the option.
- Windows supports four high contrast modes (White, Black, #1, and #2), and these map to four overlapping resource types: standard, high, black, and white as follows:
Contrast Setting in Control Panel Applicable Resource Qualifiers
ms-contrastQuery Parameter Value
High Contrast White
white High Contrast Black
black High Contrast #1
black High Contrast #2
With an estimated 50 billion devices connected to the Internet by 2020, several industries will begin to expand their capabilities for retaining end point data at the edge to better utilize the range of data types and sheer volume of M2M data generated by the Internet of Things. In his session at @ThingsExpo, Don DeLoach, CEO and President of Infobright, will discuss the infrastructures businesses will need to implement to handle this explosion of data by providing specific use cases for filte...
Feb. 9, 2016 05:00 PM EST Reads: 149
SYS-CON Events announced today that VAI, a leading ERP software provider, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. VAI (Vormittag Associates, Inc.) is a leading independent mid-market ERP software developer renowned for its flexible solutions and ability to automate critical business functions for the distribution, manufacturing, specialty retail and service sectors. An IBM Premier Business Part...
Feb. 9, 2016 04:00 PM EST Reads: 589
Cognitive Computing is becoming the foundation for a new generation of solutions that have the potential to transform business. Unlike traditional approaches to building solutions, a cognitive computing approach allows the data to help determine the way applications are designed. This contrasts with conventional software development that begins with defining logic based on the current way a business operates. In her session at 18th Cloud Expo, Judith S. Hurwitz, President and CEO of Hurwitz & ...
Feb. 9, 2016 04:00 PM EST Reads: 222
Fortunately, meaningful and tangible business cases for IoT are plentiful in a broad array of industries and vertical markets. These range from simple warranty cost reduction for capital intensive assets, to minimizing downtime for vital business tools, to creating feedback loops improving product design, to improving and enhancing enterprise customer experiences. All of these business cases, which will be briefly explored in this session, hinge on cost effectively extracting relevant data from ...
Feb. 9, 2016 03:15 PM EST
SYS-CON Events announced today that Men & Mice, the leading global provider of DNS, DHCP and IP address management overlay solutions, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. The Men & Mice Suite overlay solution is already known for its powerful application in heterogeneous operating environments, enabling enterprises to scale without fuss. Building on a solid range of diverse platform support,...
Feb. 9, 2016 03:00 PM EST Reads: 182
As enterprises work to take advantage of Big Data technologies, they frequently become distracted by product-level decisions. In most new Big Data builds this approach is completely counter-productive: it presupposes tools that may not be a fit for development teams, forces IT to take on the burden of evaluating and maintaining unfamiliar technology, and represents a major up-front expense. In his session at @BigDataExpo at @ThingsExpo, Andrew Warfield, CTO and Co-Founder of Coho Data, will dis...
Feb. 9, 2016 03:00 PM EST Reads: 164
SYS-CON Events announced today that Pythian, a global IT services company specializing in helping companies adopt disruptive technologies to optimize revenue-generating systems, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Founded in 1997, Pythian is a global IT services company that helps companies compete by adopting disruptive technologies such as cloud, Big Data, advanced analytics, and DevO...
Feb. 9, 2016 02:45 PM EST Reads: 189
SYS-CON Events announced today that iDevices®, the preeminent brand in the connected home industry, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. iDevices, the preeminent brand in the connected home industry, has a growing line of HomeKit-enabled products available at the largest retailers worldwide. Through the “Designed with iDevices” co-development program and its custom-built IoT Cloud Infrastruc...
Feb. 9, 2016 02:45 PM EST
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
Feb. 9, 2016 02:15 PM EST Reads: 390
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 ad...
Feb. 9, 2016 01:15 PM EST Reads: 368
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
Feb. 9, 2016 11:30 AM EST Reads: 401
Eighty percent of a data scientist’s time is spent gathering and cleaning up data, and 80% of all data is unstructured and almost never analyzed. Cognitive computing, in combination with Big Data, is changing the equation by creating data reservoirs and using natural language processing to enable analysis of unstructured data sources. This is impacting every aspect of the analytics profession from how data is mined (and by whom) to how it is delivered. This is not some futuristic vision: it's ha...
Feb. 9, 2016 08:45 AM EST Reads: 428
With the Apple Watch making its way onto wrists all over the world, it’s only a matter of time before it becomes a staple in the workplace. In fact, Forrester reported that 68 percent of technology and business decision-makers characterize wearables as a top priority for 2015. Recognizing their business value early on, FinancialForce.com was the first to bring ERP to wearables, helping streamline communication across front and back office functions. In his session at @ThingsExpo, Kevin Roberts...
Feb. 9, 2016 08:00 AM EST Reads: 365
One of the bewildering things about DevOps is integrating the massive toolchain including the dozens of new tools that seem to crop up every year. Part of DevOps is Continuous Delivery and having a complex toolchain can add additional integration and setup to your developer environment. In his session at @DevOpsSummit at 18th Cloud Expo, Miko Matsumura, Chief Marketing Officer of Gradle Inc., will discuss which tools to use in a developer stack, how to provision the toolchain to minimize onboa...
Feb. 9, 2016 07:45 AM EST
The cloud promises new levels of agility and cost-savings for Big Data, data warehousing and analytics. But it’s challenging to understand all the options – from IaaS and PaaS to newer services like HaaS (Hadoop as a Service) and BDaaS (Big Data as a Service). In her session at @BigDataExpo at @ThingsExpo, Hannah Smalltree, a director at Cazena, will provide an educational overview of emerging “as-a-service” options for Big Data in the cloud. This is critical background for IT and data profes...
Feb. 9, 2016 06:45 AM EST Reads: 178
Silver Spring Networks, Inc. (NYSE: SSNI) extended its Internet of Things technology platform with performance enhancements to Gen5 – its fifth generation critical infrastructure networking platform. Already delivering nearly 23 million devices on five continents as one of the leading networking providers in the market, Silver Spring announced it is doubling the maximum speed of its Gen5 network to up to 2.4 Mbps, increasing computational performance by 10x, supporting simultaneous mesh communic...
Feb. 8, 2016 05:00 PM EST
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry's single source for the cloud. Fusion's advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including clou...
Feb. 6, 2016 03:30 PM EST Reads: 746
Most people haven’t heard the word, “gamification,” even though they probably, and perhaps unwittingly, participate in it every day. Gamification is “the process of adding games or game-like elements to something (as a task) so as to encourage participation.” Further, gamification is about bringing game mechanics – rules, constructs, processes, and methods – into the real world in an effort to engage people. In his session at @ThingsExpo, Robert Endo, owner and engagement manager of Intrepid D...
Feb. 5, 2016 09:00 PM EST Reads: 806
WebRTC has had a real tough three or four years, and so have those working with it. Only a few short years ago, the development world were excited about WebRTC and proclaiming how awesome it was. You might have played with the technology a couple of years ago, only to find the extra infrastructure requirements were painful to implement and poorly documented. This probably left a bitter taste in your mouth, especially when things went wrong.
Feb. 2, 2016 04:30 AM EST Reads: 872
Learn how IoT, cloud, social networks and last but not least, humans, can be integrated into a seamless integration of cooperative organisms both cybernetic and biological. This has been enabled by recent advances in IoT device capabilities, messaging frameworks, presence and collaboration services, where devices can share information and make independent and human assisted decisions based upon social status from other entities. In his session at @ThingsExpo, Michael Heydt, founder of Seamless...
Feb. 1, 2016 05:00 AM EST Reads: 959