I am working on an Android project and I am considering porting its current state over to Unity.
This project is a client-server based game with people playing together. When an event occurs on the server, a notification is sent down to the device via Cloud2Device Messaging to “wake up” the application.
As I am unfamiliar with the integration points between the Unity3D engine and the Android platform, I am not sure if I can utilize Cloud2Device Messaging with Unity. Does anybody know if Unity supports this, or at least does not prevent utilization of the service (by not recognizing the necessary intent, etc.)?
Thanks for any help.
If you implement it, then yes.
Unity has no integrated support for this kind of thing, neither on Android nor iOS, but in trade it has plugin support on both the pro and the non-pro licenses.
I was able to get this working. A tutorial of my solution has been posted to http://devblog.twelve21.net/tutorials/using-googles-cloud2device-messaging-with-unity3d/.
First, I created an extension of UnityPlayerActivity and added in C2DM logic for registration. I also added a C2DMReceiver class to receive the intents. Upon receiving an intent, I use UnityPlayer.UnitySendMessage to deliver the message to a specifically-named GameObject within my game.
I created a custom Android manifest and placed it within Assets/Plugins/Android. This manifest references the custom activity and receivers.