locked
How to Set Tile Expiration within Database Script RRS feed

  • Question

  • I have the following mobile service database insert script to send game information out to client Tiles.  What code should be added to 'expire' that game information, say after 1 minute, and put the tile image back to original state?

    Insert Script

    function sendNotifications()
    {
        var uriTable = tables.getTable('MyScoreBook_Games');
           
            uriTable.where({GameID: item.GameID}).read(
            {success: function(uris)
               {
                uris.forEach(function(channel)
                {
                        push.wns.sendToastText02(channel.Uri,
                            {
                            text1: item.Team + "  " + item.Player + " " + item.Result,
                            text2: "Period: " + item.Period + "  Time: " + item.ClockTime + " Team: " + item.Team
                            },
                        {
                        success: function(pushResponse)
                            {
                                console.log("Sent Toast push:", pushResponse);
                            }
                        });
                  
          
                 }); //end of for each
                
               }
            });
           
    } // end of send notifications

    Wednesday, March 6, 2013 7:46 PM

Answers

All replies