发送从PHP服务器端应用程序的通知(一些数据)到Android客户端应用程序 [英] Sending notification (few data) from PHP server side App to Android Client Side App

查看:121
本文介绍了发送从PHP服务器端应用程序的通知(一些数据)到Android客户端应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能从我的PHP服务器端应用程序到Android客户端应用程序在通知或别的东西我不想使用C2DM方面发送数据,没有任何其他选择。

How can I send data from my PHP server side App to Android Client Side App in terms of Notification or something else i dont want to use C2DM ,is there any other Alternative.

我想送一个特定事件这样的数据发生在服务器就像插在某些表或按用户删除的,而且现有的行共享用户B.So我想通过发送一些通知,通知用户B的新行他的手机。

I want to send such data on a particular event happen on server like a new row inserted in some table or existing row deleted by user A but also shared to user B.So i want to notify user B by sending some notification on his mobile.

推荐答案

在服务器和客户机之间的HTTP通讯通常是由客户端请求启动。 Android有可能由PHP服务器端的请求,作为一个事件没有发生服务运行。所以,我能想象的唯一途径就是在这种情况下使用反向AJAX。结果
也许看看这里:结果
使用反向Ajax实现PHP

A http communication between a Server and a Client is usually started by a client-request. Android has no service running which could be requested by the php server side, as an event happens. So the only way I could imagine is to use reverse ajax in this case.
Maybe take a look here:
Reverse Ajax implementation using php

这篇关于发送从PHP服务器端应用程序的通知(一些数据)到Android客户端应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆