我想使用解析后端将推送通知发送给多个用户。我可以在不创建频道的情况下以具有Facebook ID的朋友为目标吗?
如果无法发送,请向我发送创建频道的代码
根据您拥有哪种帐户,解析有不同的可能性。我假设您有免费帐户,因此您无法使用这种帐户向特定或多个用户发送推送通知。但是您可以将它们通过网站控制器发送给iOS或Android用户,这是免费帐户的唯一选择。
实际上,我鼓励您使用渠道来这样做。我假设您已经按照解析网站(https://parse.com/docs/android_guide)中的说明进行了正确的初始化
// Create our Installation query
ParseQuery pushQuery = ParseInstallation.getQuery();
pushQuery.whereEqualTo("channels", "Giants"); // Set the channel
pushQuery.whereEqualTo("scores", true);
// Send push notification to query
ParsePush push = new ParsePush();
push.setQuery(pushQuery);
push.setMessage("Giants scored against the A's! It's now 2-2.");
push.sendInBackground();
我最终建议您阅读此指南:https : //parse.com/docs/push_guide#sending-queries/Android
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句