user1569143
user1569143

Reputation: 31

Sending notification to Android Application using PHP

I am making an android application that can be remotely managed by PHP.

I mean like, for example, I want to send a notification to the android app. My android app will then fetch it and process it.

I have an idea, my PHP program will just save this notification to "pending notifications table" then my android app will fetch it. But my android app will always fetch like for example every 5 seconds, get pending notifications, and even if no pending notifications, it will just fetch and fetch every 5 seconds which I think not a better solution for this.

What I want to do is, when I send a notification to the android app using PHP, it will automatically be processed.

Any better solution to this?

Thank you.

PS. What I mean with notifications are not push notifications. It's like a command that I will send to the android app.

Upvotes: 0

Views: 256

Answers (1)

EGHDK
EGHDK

Reputation: 18120

I believe you are looking for this: http://developer.android.com/guide/google/gcm/index.html

"...it should be used to tell the application that there is new data on the server, so that the application can fetch it."

"GCM also provides helper libraries for client and server development."

Upvotes: 1

Related Questions