【问题标题】:I Want to Use "Parse Notification" in my Android App我想在我的 Android 应用程序中使用“解析通知”
【发布时间】:2014-02-05 19:57:09
【问题描述】:

我在 Google Play 商店中发布了一个 Android 应用程序,我想添加推送通知。 我尝试了Parse.com 并实现了this guide 中提到的代码。 当我尝试发送测试推送时,Parse.com 说:`没有客户订阅广播推送频道。请仔细检查您是否正确设置了 SDK。

还有,当我去解析云时

仪表板 --> 推送通知 --> 发送推送

解析 说: Your application does not have any registered devices to which it can send notifications.

我确定我已经正确实现了所有代码!

【问题讨论】:

  • 您能否举例说明您是如何在您的应用中实现 Parse Push 的?
  • 您是否发布了包含push 的应用的更新版本?

标签: android push-notification parse-platform


【解决方案1】:

我认为您忘记了(正如错误消息告诉您的那样)注册该设备!

  ParseUser user = new ParseUser();
    user.setUsername("jondoe");
    user.setPassword("123456");
    user.setEmail("jon@gmail.com");


    user.signUpInBackground(new SignUpCallback() {
      public void done(ParseException e) {
        if (e == null) {
          // Hooray! Let them use the app now.
        } else {
          // Sign up didn't succeed. Look at the ParseException
          // to figure out what went wrong
        }
      }

    @Override
    public void done(com.parse.ParseException arg0) {
        // TODO Auto-generated method stub
}
    });

您的设备注册后,系统就会知道向谁发送通知! 此外,在 Parse.com 仪表板的“数据浏览器”选项卡中,如果单击左侧的“安装”,您必须看到一行。

【讨论】:

    猜你喜欢
    • 2011-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-21
    • 1970-01-01
    相关资源
    最近更新 更多