android - 我想在我的 Android 应用程序中使用 "Parse Notification"

标签 android push-notification parse-platform

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

另外,当我去解析云时

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

解析说: 您的应用程序没有任何可以向其发送通知的注册设备。

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

最佳答案

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

  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 仪表板中的“数据浏览器”选项卡中,如果您单击左侧的“安装”,您必须看到一行。

关于android - 我想在我的 Android 应用程序中使用 "Parse Notification",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18772737/

相关文章:

Android 和(数百万)推送通知

ios - 如何将从相机拍摄的图像保存到 Parse?

swift - 没有这样的模块 'Parse'

java - sharedpref 将字符串添加到表中

android - 如何应用主题以获得准确的 View ?

android - View Pager + ImageView +Pinch Zoom + Rotation

iphone - 推送通知证书问题

android - 试图让 proguard 工作,但它总是失败

ios - 在未登录的情况下新安装应用程序后禁用推送通知

ios - 解析从 Int 到 String 的转换不起作用