Abhi
Abhi

Reputation: 5561

Sending notification (few data) from PHP server side App to Android Client Side App

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.

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.

Upvotes: 1

Views: 1736

Answers (2)

dpc
dpc

Reputation: 11

The best thing is to create background service that will check i.e every 10 minutes if content has changed. You could check it by adding simple revision number on server side and then compare it with saved on android. If something has changed download all/specific content.

Upvotes: 1

Lars
Lars

Reputation: 1043

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

Upvotes: 2

Related Questions