Send push notifications to Android

前端 未结 5 655
长情又很酷
长情又很酷 2021-01-13 00:17

I am currently developing Java web services that run on WebLogic on a server. These web services are called by a mobile application, which is developed by another team. Ther

5条回答
  •  心在旅途
    2021-01-13 00:42

    You can use Google Cloud Messaging to do this, it now supports Android and iOS. Its free and has no limits to number of notification.

    How it works?

    Simply, you need to generate Registration ID from your mobile and send it to your server, then when you need to send a notification just send the registration ID and the message to GCM.

    Please check this link from Google about GCM:

    https://developers.google.com/cloud-messaging/

    and this link just take a quick look about server code (written in PHP):

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

    there is some changes you can notice it in first link.

    Finally, check this link it explains the client code step by step:

    http://www.androidwarriors.com/2015/10/push-notification-using-gcm-in-android.html

    I hope this helps you, do not hesitate to ask any question.

提交回复
热议问题