ArcGISPortalViewer.Model.TileService.SendSmallTileTextNotification C# (CSharp) Method

SendSmallTileTextNotification() public static method

public static SendSmallTileTextNotification ( string text, string imageUri = "Assets/WideLogo.jpg" ) : void
text string
imageUri string
return void
        public static void SendSmallTileTextNotification(string text, string imageUri = "Assets/WideLogo.jpg")
        {
            // Get a filled in version of the template by using getTemplateContent  
            var tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquare150x150PeekImageAndText01);

            // You will need to look at the template documentation to know how many text fields a particular template has         

            // get the text attributes for this template and fill them in  
            var tileAttributes = tileXml.GetElementsByTagName("text");
            tileAttributes[0].AppendChild(tileXml.CreateTextNode(text));

            var tileAttributes2 = tileXml.GetElementsByTagName("image");
            tileAttributes2[0].Attributes[1].InnerText = imageUri;

            // create the notification from the XML  
            var tileNotification = new TileNotification(tileXml);

            // send the notification to the app's default tile  
            TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
        }