Georgian Benetatos
Georgian Benetatos

Reputation: 728

Server that can save to sql and push to android

I'm trying to find a way to send an object from android device to a server that will store the object in a database then will push the object to subscribed devices. I want to use it locally so I don't want to use GCM. Anything but GCM.

My android app saves to mysql via php. The other devies poll the database. I want to use push.

Upvotes: 1

Views: 343

Answers (1)

marshallino16
marshallino16

Reputation: 2671

To push database to your server, you need to generate an API (or for the POC state juste a .php file with POST argument) and contact it through an AsyncTask from your Android code.

To push from the server to the subscribers, I suggest you to take a look at the Observer design pattern wiki link. You'll need to register the app to your server so it can push data to the app back.

Upvotes: 2

Related Questions