Android & iOS Push Notifications

Hi. I am developing an application in Unity 3D 5 for Android and iOS. I need the users to be able to sign up for push (remote) notifications. I also need to send the push message from a PHP file. Let’s say 3 out of 5 users have created a Search. It could be something like “Cars for sale”. The PHP file will then determine whether or not to send a push message.

In short: I know how to do the PHP stuff, but what I need to know is how to do the following:

Register device token to my hosted MySQL.
Add Searches (values) next to the device token in the MySQL table.
Send push notifications (to both platforms) from a hosted PHP script.

I have tried the following:

PushWoosh (not able to individually send push)
ECPN (outdated, no response from developer)
App42 (not able to individually send push, or at least I could not figure out how)
Parse (Builded app crashes on all devices)

Best regards, Andreas.


For using notifications,

  1. GCM(Play Store targeted products) will be used on Android and APNS on iOS
  2. Once you launch your app, you will register for respective service and get a token after registration
  3. Once you get the token/RegistrationID , you will pass it to your server and here you need to save it to the players profile for easy access later.
  4. For sending a notification to an user, Get the token/registrationID assigned to the player profile and send the request with the payload to GCM , and APNS on Android, iOS respectively.
  5. Now GCM and APNS will contact the device and push the payload.
  6. On receiving payload, on Android you need to do handle on your own to display it where as on iOS its automated.

Hope it gave a clear idea on how it works.

Adding to this, We developed Cross Platform Native Plugins to simplify the whole process of handling local and remote notifications on iOS and Android with a unified API interface for iOS and Android(play store) platforms. It has many other features along with notifications and comes with a unified API for both iOS and Android.

Hey Andreas,

You can try this new asset:
It can do all you need and works fine with Unity 5. Its demo server is written in Java, but as it uses just native push notifications API for each supported platform (iOS, Google Play based Android devices and Amazon Android devices) you can use a number of PHP examples or ready solutions. I’m one of the UTNotifications developers and will be happy to help you with it.

Best regards, Yuriy.

Hi … i have purhcased UTPush Notification.(Unity Asset Store - The Best Assets for Game Making).
And running in unity4.6.1f1 with c#.
Want to integrate push notification for android and ios.
I am following same step as per manual and read whole manual, but confused on server setup.
“Demo server” is working in my local pc. Integrated for ios. when I am sending notification from ipad , it gives me output in demo server- Eclipse as “Notified client 1”, and so On.
Now I want to send notification to all ipad devices who has installed the app then how its possible ?
Demo server is running on local machine.

  1. So here question is how to setup these demo server file on my own server ?
    2.Or if it is possible with any other third party server service , How it can be done ?
  2. Should i have to need to write my own server code that manages all these server side stuff for push notification? If yes then give me some hint

Hope you will get my points.