Creating a Lock Screen Icon

,

A lock screen icon identifies your app at the bottom of the lock screen and is displayed next to the value of your app’s primary tile’s Count property.

To include an icon for your app, begin by creating a 30×30 pixel PNG image. Like the icon present in the iconic tile template, the image should contain only white pixels with areas of transparency.


Note

If the Count property of your app’s primary tile is less than 1, the icon and the Count value are not displayed.


Declare the icon in the WMAppManifest.xml file by updating the DeviceLockImageURI element, which is a child of the PrimaryToken’s template element. Add the full path to your image file and set the IsResource attribute to false and IsRelative to true, as shown in the following excerpt:

<Tokens>
  <PrimaryToken TokenID="WPUnleashed.ExamplesToken" TaskName="_default">
    <TemplateFlip>
      ...

      <DeviceLockImageURI IsRelative="true" IsResource="false">
          ImagesLockScreenIcon.png</DeviceLockImageURI>
      ...
    </TemplateFlip>
  </PrimaryToken>
</Tokens>

It is at the user’s discretion whether to allow your app to display its primary tile’s Count value on the lock screen. The user does this by selecting your app as a quick status provider in the phone’s settings (see Figure 13.11).

Image

FIGURE 13.11 Apps that provide a quick status have their Count property displayed.

Integrating your app with the phone’s lock screen is yet another great way to enrich the user experience and to bring your app to prominence.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.135.4