// Keep track of your secondary tiles with a unique ID
var nomNomTile = "SecondaryTile.NomNom"
// Set properties on the tile
var logo = new Windows.Foundation.Uri("ms-appx:///images/NomNomTruck-Logo.png")
var smallLogo = new Windows.Foundation.Uri("ms-appx:///images/NomNomTruck-SmallLogo.png")
var wideLogo = new Windows.Foundation.Uri("ms-appx:///images/NomNomTruck-WideLogo.png")
var TileActivationArguments = "TruckName=NomNom"
// Create the secondary tile
var tile = new Windows.UI.StartScreen.SecondaryTile(nomNomTile,
"Nom Nom",
"Nom Nom Barbecue Truck",
TileActivationArguments,
Windows.UI.StartScreen.TileOptions.sh
owNameOnWideLogo,
logo,
wideLogo)
tile.foregroundText = Windows.UI.StartScreen.ForegroundText.light
tile.smallLogo = smallLogo
// Request the user’s permission to create the secondary tile
// - we return the promise here, assuming that this code is embedded
// in a larger function.
// See the Windows 8 SDK Secondary Tiles sample for more info:
// http://code.msdn.microsoft.com/windowsapps/Secondary-Tiles-Sample-edf2a178
return new WinJS.Promise(function (complete, error, progress) {
tile.requestCreateAsync().then(function (isCreated) {
if (isCreated) {
complete(true)
} else {
complete(false)
}
})
})
</pre>