简体   繁体   English

使用来自解析的API在android中发送推送通知

[英]Send push notifications in android using api from parse

I am currently working on an android app for a client and it needs to use push notifications from parse.com. 我目前正在为客户端开发Android应用程序,它需要使用parse.com的推送通知。 I have been able to send notifications from the emulator and also receive messages from the server when someone sends a message from there but I want to do it in such a way such that the server automatically sends me a notification depending on a condition. 当有人从那里发送消息时,我已经能够从仿真器发送通知,也可以从服务器接收消息,但是我想这样做,以便服务器根据情况自动向我发送通知。 Is it possible and if yes, could someone direct as to how to do it. 是否可以,如果可以,有人可以指导如何做。

Your client would need to notice the condition and send the message. 您的客户需要注意情况并发送消息。 What event did you trigger a notification from? 您是从哪个事件触发通知的?

Yoou can use Parse Cloud Code. 您可以使用解析云代码。 If you have your XML parsing code in a 3rd party server, make an external call to the 3d party server through REST from Parse Cloud Code. 如果您在第3方服务器中拥有XML解析代码,则可以通过REST从Parse Cloud Code中对3d方服务器进行外部调用。 Inside your Parse Cloud Code you can check the date attribute changes, and if your condition is met, you can send push notification from the Parse Cloud Code. 在您的Parse Cloud代码中,您可以检查日期属性的更改,如果满足条件,则可以从Parse Cloud代码发送推送通知。 So your android application should communicate only with the Parse Cloud Code and let the cloud code talk to your 3rd party server. 因此,您的android应用程序应仅与“解析云代码”进行通信,并让该云代码与您的第三方服务器通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM