win8_livetile_notification_expiry

Set the expiry time for the notification push on the live (or Secondary) Tile.

Syntax:

win8_livetile_notification_expiry(expiry_time);


Argument Description
expiry_time Sets the time at which the notification should be cancelled.


Returns: N/A


Description

Use this function after calling win8_livetile_notification_begin to give the Windows 8 Live Tile an expiry time. This time is that at which the notification should be removed and is best calculated using the GameMaker: Studio Date and Time functions, as shown in the example below (setting this to -1 will show the notification indefinitely until you use the win8_livetile_tile_clear.

NOTE: This function can also apply to Secondary tiles when used along with win8_livetile_notification_secondary_begin.


Example:

var expiryTime;
expiryTime = date_current_datetime();
expiryTime = date_inc_minute(expiryTime, 5);
win8_livetile_notification_begin("TileSquarePeekImageAndText01");
win8_livetile_notification_expiry(expiryTime);
win8_livetile_notification_tag("tag0");
win8_livetile_notification_text_add("Current Score = " + string(score));
win8_livetile_notification_image_add("ms-appx:///" + working_directory + "ScoreTile.png");
win8_livetile_notification_end();

The above code will push a new Live Tile notification through to Windows 8, with some text and an image, and the tile will be shown for 5 minutes.


Back: Windows 8
Next: win8_livetile_notification_tag
© Copyright YoYo Games Ltd. 2018 All Rights Reserved