Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Richard 3 · Dec 20, 2011 at 08:15 AM · androidpushnotificationsend

Send Push Notifications to Android Device

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

Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by CarlosFM · Jun 21, 2013 at 03:21 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by Yuriy-Ivanov · Jun 14, 2015 at 02:01 PM

Hey, 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: http://universal-tools.github.io/UTNotifications/html/annotated.html (the asset also includes the detailed step-by-step manual). There is more here: http://forum.unity3d.com/threads/re...-platform-push-notifications-and-more.333045/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by dhruvc · Sep 11, 2013 at 04:26 PM

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. http://blogs.shephertz.com/2013/07/09/steps-to-integrate-push-notification-with-unity-sample-on-android/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Voxel-Busters · Aug 11, 2015 at 11:02 AM

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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Yuriy-Ivanov · Aug 11, 2015 at 11:13 AM 0
Share

Unfortunately, as I already mentioned above, Google Cloud $$anonymous$$essaging is supported by not all Android devices. If you want to support as much Android devices as possible, take a look at UTNotifications ins$$anonymous$$d.

avatar image Voxel-Busters · Aug 11, 2015 at 11:26 AM 0
Share

Thanks Yuri. Edited by adding Play Store.

avatar image vanshika1012 · May 30, 2016 at 10:09 AM 0
Share

@Voxel Busters I downloaded the package but not able to get remote notification. Although when application is open I receive the message but not when application is in background.

avatar image
0

Answer by Aligdev · Jul 25, 2021 at 11:17 AM

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:

https://firebase.google.com/docs/cloud-messaging/

and docs for Unity integration:

https://firebase.google.com/docs/cloud-messaging/unity/client

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android pin push notifications 1 Answer

Finding out if a user entered the game from notification (iOS/Android) 2 Answers

Hangs on "Pushing new content to device" when using "Build and Run" with android 1 Answer

Android notification issue 0 Answers

Opening android notification setting menu from my app? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges