How to send a notification from a php server to an Android application

How to send a notification / message / notification from a php server to my Android app. I do not want to use the C2DM service. Is there an alternative? thanks in advance

+4
source share
4 answers

There are free publishing subscription models. You can try the Google Cloud Messaging service http://developer.android.com/google/gcm/index.html .

Alternatively, you can configure the xmpp server and use the pubsub extension.

+1
source

There is another option (for push): the MQTT protocol

+2
source

There are only two alternatives to C2DM, as shown below.

a survey . The application itself periodically polled your servers to check for new messages. You will need to implement everything from queuing messages to writing polling code. Warnings are not appropriate if they are delayed due to a low polling period, but the more often you do the polling, the more the battery will die.

SMS Android can intercept SMS messages, and you can enable the payload to tell the application what to do. But why not just use SMS first?

+1
source

You can check out the Urban airship http://urbanairship.com/ , as well as many other paid services for sending push notifications in Android apps.

+1
source

Source: https://habr.com/ru/post/1398956/


All Articles