简体   繁体   中英

Sending Push Notifications to every user in Android

I am developing an android application in which user can post a certain request with his details using the application. And that request should be sent to every user who has installed the application. I would like an insight on this topic.. Also what kind of android service I have to use to achieve this? Will I need a broadcastReceiver or a localBroadcastReceiver to achieve this?

Thank you in advance.

Google Cloud Messaging (GCM) for Android is a service that allows you to send data from your server to your users' Android-powered device, and also to receive messages from devices on the same connection. The GCM service handles all aspects of queuing of messages and delivery to the target Android application running on the target device, and it is completely free.

Go to Official Docs

Another Example http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

Did you mean LocalBroadcastManager ? That's normally for internal events. Go for BroadcastReceiver .

Anyway, I would also recommend Sinch (I'm using it right now alongside Parse), Pubnub , Pusher . See which one works best for you. They all have their limitations, they work well in some areas and bad in others. If you could give more details about what you need, it would be great.

If you using php web services, then its a work of php server side. Php web services receive your request to send push notification to all users. And services fetch all users device id and send notification to all users.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM