The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Windows phone app - Tile notification problem RRS feed

  • Question

  • I use my cloud server to send tile notifications to my app. When i send the notification i get an "OK" response. Meaning everything is good. but the tile itself doesnt update with my notification. Am i suppose to run some code on the client side before i can show/receive tile notifications?
    Tuesday, November 12, 2013 2:15 AM

All replies

  • No;

    1) is it the primary tile you are trying to update

    2) can you send the request more that one and still get OK


    http://pauliom.wordpress.com

    Tuesday, November 12, 2013 8:12 AM

  • 1. yes. just the application tile.(NOT secondary)

    2.  what do you mean? I can make lots of request  , and i always get OK.

    Tuesday, November 12, 2013 11:35 AM
  • What does your push look like, are you sending it as xml?

    http://pauliom.wordpress.com

    Tuesday, November 12, 2013 2:40 PM
  • HttpClient sendNotificationRequest = new HttpClient(); HttpRequestMessage requestMessage = new HttpRequestMessage(HttpMethod.Post, new System.Uri(uri)); // Create the toast message. string tileMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<wp:Notification xmlns:wp=\"WPNotification\">" + "<wp:Tile>" + "<wp:BackgroundImage>" + picUrl+ "</wp:BackgroundImage>" + "<wp:Count>1</wp:Count>" + "<wp:Title>New Message!</wp:Title>" + "<wp:BackBackgroundImage>" + picUrl + "</wp:BackBackgroundImage>" + "<wp:BackTitle>New Message!</wp:BackTitle>" + "<wp:BackContent>" + message + "</wp:BackContent>" + "</wp:Tile> " + "</wp:Notification>"; requestMessage.Content = new StringContent(tileMessage); requestMessage.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("text/xml"); sendNotificationRequest.DefaultRequestHeaders.Add("X-WindowsPhone-Target", "token"); sendNotificationRequest.DefaultRequestHeaders.Add("X-NotificationClass", "1"); HttpResponseMessage oRespMsg2 = await sendNotificationRequest.SendAsync(requestMessage);

    // get response if (oRespMsg2.IsSuccessStatusCode) { String Cont = await oRespMsg2.Content.ReadAsStringAsync(); ServerMessage(Cont + "WINDOWS PHONE TILE Notification sent instead" + oRespMsg2.ReasonPhrase + " Code: " + oRespMsg2.StatusCode); } else { ServerMessage("\nTILE SENDING FAILED: " + oRespMsg2.ReasonPhrase + " Code: " + oRespMsg2.StatusCode + "\n"+oRespMsg2.Content); }


    Tuesday, November 12, 2013 10:17 PM
  • anyone see a problem???
    Wednesday, November 13, 2013 4:15 PM
  • Is picURL XML friendly?  And what about Message?

    If message contains %, < or >, it won't work.  (Same for picURL, check any non-XML friendly characters.)


    Darin R.


    • Edited by Darin Rousseau Wednesday, November 13, 2013 6:57 PM I goofed and put in the wrong word for 'characters'
    Wednesday, November 13, 2013 6:56 PM
  • No. is there a limit on the size of the picture?

    Does the type of tile(ex: Flip...) i chose in the App effect if notifications are displayed or not?

    • Edited by kalel111 Wednesday, November 13, 2013 7:51 PM
    Wednesday, November 13, 2013 7:51 PM
  • Yes, it has to be less than 80kb and has to load in under 15 seconds. (according to this: http://blogs.msdn.com/b/jasonz/archive/2011/01/03/tutorial-dynamic-tile-push-notification-for-windows-phone-7.aspx)

    I can't find the MSDN docs indicating that right now though.

    The tile type would dictate how things were displayed, but I don't think it would reject all the update.

    can you get a count to work at least? (remove the image URIs and message)


    Darin R.

    Wednesday, November 13, 2013 7:58 PM
  • Wednesday, November 13, 2013 10:45 PM
  • i couldn't get the count to work either. But toast notifications work fine. This is weird...
    Thursday, November 14, 2013 5:02 AM
  • I assume you are sending another message for the toast?

    http://pauliom.wordpress.com

    Thursday, November 14, 2013 8:15 AM
  • Also what are the device status? You are only checking the success of the web request.

    http://pauliom.wordpress.com

    Thursday, November 14, 2013 8:18 AM
  • Yup.  So i send a toast notification and then i send another request for tile notification. 
    Friday, November 15, 2013 2:37 AM
  • What about the device status?

    http://pauliom.wordpress.com

    Friday, November 15, 2013 8:45 PM