badge

Specifies a badge's value or glyph.

Element hierarchy

<badge>

Syntax

<badge value    = "1-99" | "none" | "activity" | "alert" | "alarm" | "available" | ...
       version? = integer />

Key

?   optional (zero or one)

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
value

Either a numeric value or a string value that specifies a predefined badge glyph. Numerically, this value can accept any valid integer. A value of 0 clears the badge, values from 1-99 display as given, and any value greater than 99 displays as 99+.

This attribute can be set to an integer or have one of the following values:

  • none
  • activity
  • alert
  • alarm
  • available
  • away
  • busy
  • newMessage
  • paused
  • playing
  • unavailable
  • error
  • attention
Yes None
version

The version of the badge XML schema this particular payload was developed for.

integer No 1

 

Child Elements

None.

Parent Elements

This outermost (document) element may not be contained by any other elements.

Remarks

This table shows the available status glyphs.

Status Glyph XML
none No badge shown <badge value="none"/>
activity the activity badge; two circling arrows <badge value="activity"/>
alarm the alarm badge <badge value="alarm"/>
alert the alert badge <badge value="alert"/>
attention the attention badge; an exclamation point <badge value="attention"/>
available the available badge; a green dot <badge value="available"/>
away the away badge; a yellow dot <badge value="away"/>
busy the busy badge; a red dot <badge value="busy"/>
error the error badge; an x <badge value="error"/>
newMessage the new mail badge; an envelope <badge value="newMessage"/>
paused the paused badge <badge value="paused"/>
playing the playing badge <badge value="playing"/>
unavailable the unavailable badge; a gray dot <badge value="unavailable"/>

 

See also

Badge overview

App tiles and badges sample

How to send a glyph or numeric badge in a local notification

How to clear a badge

Guidelines and checklist for tiles and badges

Requirements

Value
Namespace http://schemas.microsoft.com/notifications/2012/badge.xsd