简体   繁体   English

如何在Ionic上使用Web服务进行推送通知服务?

[英]How can i do a push notification service with a webservice on Ionic?

Ok, i need some help… I'm finishing an app but i need some kind of service who looks in my backend and when my JSON changes (this JSON contain some valors who changes if the user get notifications) send to that user a pushmessage to the terminal even the app is off. 好的,我需要一些帮助…我正在完成一个应用程序,但是我需要某种服务,该服务可以在后端查看,并且当我的JSON更改时(此JSON包含一些勇气,如果用户收到通知,这些勇气会改变)向该用户发送推送消息到终端,即使该应用已关闭。 Something like an ajax call every 'x' seconds but doing it in mobile. 就像ajax每隔“ x”秒调用一次,但在移动设备中进行。

I've past a few days searching but i'm completly lost and i need some kind of tutorial, example or something. 我已经搜寻了几天,但完全迷路了,需要某种教程,示例或其他内容。

I've searched in the forum but i doesn't find anything. 我已经在论坛中搜索过,但没有找到任何东西。

Thanks anyway 不管怎么说,还是要谢谢你

you can achieve what you want using Events that will be triggered when something changes in your backend (if you're using a modern framework like Laravel you can do it easily) 您可以使用将在后端发生更改时触发的事件来实现您想要的目标(如果您使用的是Laravel这样的现代框架,则可以轻松实现)

Inside the event it will see that a change is made and then send a push notification to that device with whatever service you used (acm, pusher,...etc) 在事件内部,将看到进行了更改,然后使用您使用的任何服务(acm,pusher等)向该设备发送推送通知。

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

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