【问题标题】:Azure Mobile Services Push Tile Notification and Clear Tile PropertiesAzure 移动服务推送磁贴通知和清除磁贴属性
【发布时间】:2013-02-07 10:03:34
【问题描述】:

我正在使用 Azure 移动服务计划程序服务定期访问另一个 api 并发送带有更新信息的实时磁贴推送通知。但是,有时无法从外部 api 获得一条数据,我需要清除其中一个磁贴属性。问题是,当我推出新通知时,我似乎无法从磁贴中清除值。我试过发送 null、空字符串和未定义。但我做什么都不会清除它。这是我的调度程序代码:

push.mpns.sendFlipTile(channel.uri, 
{
    title: 'My Title',
    backgroundImage: getTileUrl('front', 'medium', word),
    backBackgroundImage: getTileUrl('back', 'medium', word),
    wideBackgroundImage: getTileUrl('front', 'wide', word),
    wideBackBackgroundImage: getTileUrl('back', 'wide', word),

    backTitle: null,        // Doesn't clear value
    //backTitle: '',        // Doesn't clear value
    //backTitle: undefined, // Doesn't clear value

    count: '0'              // Sending 0 as a string will clear the counter
}, 
{
    success: function(pushResponse) {
        console.log("Sent push:", pushResponse);
    },
    error: function(errorResponse) {
        console.error("Error push:", errorResponse);
    }
});

谁能帮帮我?

【问题讨论】:

    标签: javascript azure azure-mobile-services


    【解决方案1】:

    感谢您提出这个问题。目前我们不支持清除值的功能。 this bug 正在跟踪该功能的添加。请通过在our UserVoice page 上输入条目来帮助我们优先解决此问题!

    【讨论】:

      【解决方案2】:

      根据本文档: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206971(v=vs.105).aspx

      您需要将该 backTitle 的 Action 属性设置为 Clear。 不知道如何在 Windows Azure 移动服务 MPNS 上做到这一点。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-10-07
        • 1970-01-01
        • 2022-07-17
        相关资源
        最近更新 更多