0

I am new with IBM Bluemix and I want to add PHP code for sending push notifications on both iOS and Android devices.

My app is built with the Xamarin platform for both type of mobile devices.

The backend is created in PHP with the Codeigneter framework.

I see in the Dashboard there is direct user interface for sending a push in Bluemix, but I want to send a Push on run-time for example: some user sending a friend request and the other user automatically receiving a push notification.

joe
  • 2,468
  • 2
  • 12
  • 19

1 Answers1

0

There is not a PHP SDK library, but you could accomplish your behavior by checking out the Push Notifications Swagger documentation:

https://mobile.ng.bluemix.net/imfpushrestapidocs/

First you would register your mobile app so it receives push notifications (using the Android or iOS Client SDKs available here). Then you could have your backend send the push notification to a specific device on the event that a friend request is sent by using the REST API (as outlined in the Swagger docs).

joe
  • 2,468
  • 2
  • 12
  • 19
  • I don t understand your answer please tell me there is any php code or library for sending push notification or not. – Ankit Suthar Aug 04 '16 at 05:42
  • You can use any HTTP request library to send a Push Notification in PHP. – joe Aug 04 '16 at 06:47
  • After you register the device for Push Notifications using the Client SDK, try sending a Push Notification from the Swagger Docs. If this works, convert this POST request into PHP code, and then your PHP backend will be able to send the notification. – joe Aug 04 '16 at 06:52