locked
Send tile text to lock screen

    Question

  • Hi everybody. I'm writing a universal app and I'm trying to send text to the lock screen. I have a background task that creates the wide tile which works on the start screen and I enable the badge and tile text option in the app manifest but I see no text on the lock screen. With the same code on the mobile version I can see text on the lock screen. Here is the code. Is there anything else I must do to make it work? Thanks in advance.

    var wideTile = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWide310x150PeekImage02);
                var wideTileImageAttributes = wideTile.GetElementsByTagName("image");
    
                ((XmlElement)wideTileImageAttributes[0]).SetAttribute("src", fileNameWide);
    
                
                wideTile.GetElementsByTagName("text")[0].InnerText = "Text 1";
                wideTile.GetElementsByTagName("text")[1].InnerText = "Text 2";
                wideTile.GetElementsByTagName("text")[2].InnerText = "Text 3";
                wideTile.GetElementsByTagName("text")[3].InnerText = "Text 4";
                updater.Update(new TileNotification(wideTile));            


    Sunday, February 01, 2015 11:18 AM

Answers

  • I think I've found the problem. After the wide tile I had the code for the large one. So my last line was updater.Update(new TileNotification(largeTile)); That was stopping the wide tile text from displayed on the lock screen. Moving the the wide tile code at the end solved the problem. Just one question should I use different the same updater for the three different tile sizes of declare one for each tile. Thanks very much for your time. 
    • Marked as answer by giannisdolon Monday, February 02, 2015 11:39 AM
    Monday, February 02, 2015 11:38 AM

All replies

  • Hi,

    Please see the doucument:

     Update a live tile from a background task

    I cannot reproduce your problem. When I create a project to test, everything is ok. Please upload a reproduce project to oneDrive so that we can test it.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, February 02, 2015 6:42 AM
  • I think I've found the problem. After the wide tile I had the code for the large one. So my last line was updater.Update(new TileNotification(largeTile)); That was stopping the wide tile text from displayed on the lock screen. Moving the the wide tile code at the end solved the problem. Just one question should I use different the same updater for the three different tile sizes of declare one for each tile. Thanks very much for your time. 
    • Marked as answer by giannisdolon Monday, February 02, 2015 11:39 AM
    Monday, February 02, 2015 11:38 AM