- Home /
Unity3d game does not receive push notifications
I am building a game using Unity3d, that is going to use the GCM service (which I wrote into a custom library). But here is my problem. This custom library works, as long as it is in a native android application.
The moment I put it in the Unity3d game and send a push notification, the device does not receive the push notification. I know the library is accessable, because I can read the debug logs in the logcat, that are from the library.
I think Unity3d somehow prevents the GCM service from running, thus preventing the device from receiving push notifications.
Is there anything I should know about Unity3d, that causes this problem? Or did someone had a similiar problem? Any help would be appriciated!
Answer by vishnu24 · Feb 27, 2015 at 12:38 PM
For Push Notification in Unity you have to write native plugin that will communication to native and send push Message when received in device.
ShepHertz also provide Unity Push plugin that will work on iOS and Android both. You can download ShepHertz Unity Plugin, and follow easy steps for Push Notification integration on iOS and Android device.
You can go through with ShepHertz Push Notification API, provides various API's for Push Notification across multiple platform.
The person who is asking has written a plugin, so he knows that he needs native plugin, so your answer doesn't help.
Your post is just an ad for the product.
You can refer this as a reference and check where you are working wrong.
while changing Bundle Identifier may be you forget to change Android$$anonymous$$anfest.xml file in Android Plugin.
Answer by Paulius-Liekis · Nov 26, 2012 at 04:19 PM
No, Unity should not do anything like that. We're using GCM in our project with Unity and it runs just fine. Are you sure you set up activities/AndroidManifest correctly?
Hi is there a tutorial or any sample showing how this integration is doable ? Pls do let me know if there are ny other solutions for push notification in android -unity3d app