一起學Windows Phone7開發(十二.一 Tile Notification)

來源:互聯網
上載者:User

      在push notification中,Tile noftification是比較特殊(raw notification 其實就是http post 方式收到的資料; toast notification是由系統來實現的),因為這個需要開發的時候,一半是由系統來完成的(也就是更新Quick Launch Area的圖片由系統來完成),一半是由開發來完成的(按要求製做圖片,以及載入圖片)。

一.制用Tile 圖片要求

二.     WebService端實現

Tile Message :

"Content-Type: text/xml\r\nX-WindowsPhone-Target: token\r\n\r\n"

<?xml version="1.0" encoding="utf-8"?>

<wp:Notification xmlns:wp="WPNotification">

     <wp:Tile>

       <wp:BackgroundImage>

            <background image path>//這裡要填寫圖片所在的相對位置

(如: new Uri(@"Images/" + weather + ".png", UriKind.Relative)))

        </wp:BackgroundImage>

       <wp:Count>

         <count>

        </wp:Count>

       <wp:Title>

          <title>

       </wp:Title>

    </wp:Tile>

</wp:Notification>

三.手機端實現

1.       圖片載入:

一定要把載入進來的圖片屬性設為“Content”,否則無法顯示。

2.       設定:

在程式properties中設定Tile初始文字和圖片

設定後的效果:

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.