When your app is installed, atile is added to your start screen.
By default it displays standard tile.
For adding standard tile to html js windows 8 app – http://technologiesdotnet.blogspot.in/2012/11/adding-tiles-to-javascript-html-metro.html
To make your normal tile as live tile you have to show some updated content on your tile.
for that you can use local notifications to show some content on your tiles.
For intellisense when you are working with live notifications, toasts and tiles you have to use notificationsextension library in your code.
This notification extension library is available in app-tiles-and-badges-sample you download from Microsoft website.
http://code.msdn.microsoft.com/windowsapps/app-tiles-and-badges-sample-5fc49148
download javascript sample
extract it
open c#,javascript folder
open it in visual studio 2012
build it.\
now
go to your project – solution explorer – references – add reference – browse winmd file from the below location in the sample you build before and add reference to your project.
C#,JavaScript\bin\Debug\NotificationsExtensions.winmd
Now you can use three methods – TileContent, BadgeContent and ToastContent
sample javascript code to add badge on tile:
add the below code in default.js page inside app event listener
js code:
var badgeContent = new NotificationsExtensions.BadgeContent.BadgeNumericNotificationContent(85);
var badgeNotification = badgeContent.createNotification();
Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication().update(badgeNotification);
js code live notifications:
//live tiles
var tileContent = NotificationsExtensions.TileContent.TileContentFactory.createTileWideText03();
tileContent.textHeadingWrap.text = “Primaccess”;
var squareTileContent = NotificationsExtensions.TileContent.TileContentFactory.createTileSquareText04();
squareTileContent.textBodyWrap.text = “Infinite Oppurtunities”;
tileContent.squareContent = squareTileContent;
var tileNotification = tileContent.createNotification();
Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification);
js code toast notifications:
//toasts
var toastContent = NotificationsExtensions.ToastContent.ToastContentFactory.createToastText02();
toastContent.textHeading.text = “Primaccess”;
toastContent.textBodyWrap.text = “Infinite Oppurtunities”;
toastContent.launch = ‘{“type”:”toast”,”param1″:”12345″,”param2″:”67890″}’;
var toast = toastContent.createNotification();
Windows.UI.Notifications.ToastNotificationManager.createToastNotifier().show(toast);