Send Push Notifications to Android Device

How would you go about sending push notifications to an Android Device? Is it possible?


I realise this is an old post and that you may not be interested in the answer anymore. But just for reference, here is my answer:

Yes, it is possible to send remote notifications to android devices. Depending on what you mean this is straightforward or slightly more complex:
-If you mean sending a notification from you (a website, server…) to an android device, or if you want to send notifications in between users, this can be achieved using the Google Cloud Messaging service.
-If you meant sending an actual push notification from an iOS device to an android device, this is slightly more complicated, as it involves coordinating both android and iOS devices via a server, and making use of GCM and possibly Apple Push Notification Services (if you want android to iOS messaging).

In any case, I’ve developed an asset that allows you to do both! So you can bring remote notifications to your unity projects (no matter if they are iOS or Android, it’s fully cross-platform!)

Here is a link to the Asset Store: EASY Cross-platform Notifications

It comes with a full step-by-step guide to help you set the system up.

Shephertz backend APIs for push can be integrated with Unity on Android. While sending a push is a straight forward REST request, receiving is a bit tricky. I recommend you going through this blog post - it contains all the integration steps.

Google Cloud Messaging is used for setting up notifications on Android. You need to write a plugin by calling the required methods.

Steps involved are

  1. Once you get senderId from google play dev console, register to GCM with senderId
  2. On Registration, you will get a device token/Registration Id and this will be used to send notifications to device.
  3. Send this id to your server and request GCM to deliver a payload with required registration Ids
  4. Add a wakeful service and receive the notification payload on your device
  5. Parse the payload and fire notification with NotificationCompat

To make the process simpler, We developed a Cross Platform Native Plugins which supports Local & Remote Notifications along with many other useful features (IAP, Webview, Sharing…). You can try out lite version incase if you want to test the plugin.

Its a Unified API and same code works on both iOS and Android(Play Store) platforms.

Now, years later, Google Cloud Messaging id deprecated and is replaced by Firebase Cloud Messaging. It supports both iOS and Android (I personally prefer Apple Push Notification service for iOS). Here is the documentation:

and docs for Unity integration:

Please note, that Google Cloud Messaging is not universal solution for the push notifications in Android. Amazon devices (entire Amazon Kindle series) doesn’t support it.
But there is now a new asset available in the Asset Store - UTNotifications. It works seamlessly with both the local and push notifications for Android (Google Play based & Amazon devices) and iOS. It’s very customisable - the complete source code is provided for both the client & server sides. As one of its developers I would be glad to assist you with its integration. Here is an API Reference: UTNotifications: Class List (the asset also includes the detailed step-by-step manual).
There is more here:…-platform-push-notifications-and-more.333045/