简体   繁体   中英

Toast Notification Format to Both WIndows Store App and Windows Phone 8

people have said they can push same toast notification from Azure notification hub to both windows 8 apps and windows phone 8 apps. My question is what the toast looks like for that..

From the examples, for windows 8, the format is like this

<toast>
    <visual>
        <binding template="ToastText01">
            <text id="1">bodyText</text>
        </binding>  
    </visual>
</toast>

For windows phone, it's

<?xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification">
    <wp:Toast>
        <wp:Text1>[string]</wp:Text1>
    </wp:Toast>
</wp:Notification>

So how do we make the toast compatible to both? Thanks.

You can't. You need to send the appropriate format content to the appropriate devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM