【问题标题】:Send Parse JSON Push from web interface从 Web 界面发送 Parse JSON Push
【发布时间】:2014-09-19 20:11:21
【问题描述】:

我正在尝试从 Parse Web 界面向我的 iPhone 发送 JSON Push,但它不起作用。

网络服务告诉我状态为完成,通知为“无警报”,但我的 iPhone 上没有任何通知...

这就是我得到的:http://i.stack.imgur.com/bCh2F.png

这是我发送的 JSON:

{ "data": { "alert": "A test notification from Parse!" } }

是的,带有消息(无 JSON)的简单推送工作正常。

感谢您的帮助

【问题讨论】:

    标签: ios json push-notification parse-platform


    【解决方案1】:

    试试{ "aps": { "alert": "A test notification from Parse!" } }

    【讨论】:

      【解决方案2】:

      我使用以下 JSON 单级,它对我有用(正确显示标题和警报消息):

      {
          "title": "<the title goes here>",
          "alert": "<the message goes here>",
      }
      

      另外我从代码中发现,如果你不通过重写 ParsePushBroadcastReceiver 的 onPushOpen 来做任何魔法,你可以添加一个 uri 和一个 action。例如,我们用来向用户发送有关可用更新的信息(如果版本非常过时)的这个:

      {
          "title": "<the title goes here>",
          "alert": "<the message goes here>",
          "uri": "https://play.google.com/store/apps/details?id=<package name>",
          "action": "android.intent.action.VIEW"
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多