i have integrated pubnub unity project. chat function working. looking way receive push notifications when user offline.
i familiar how gcm works. basically, can find gcm api key , put in pubnub dashboard. however, on unity side, suppose there has plugin cannot find anywhere.
to send gcm push notifications device:
- you need use our rest api register device (http://www.pubnub.com/docs/unity3d-c-sharp/mobile-gateway#gcm_prerequisites) ,
- then publish message in format: http://www.pubnub.com/docs/unity3d-c-sharp/mobile-gateway#sending_a_gcm_test_message_via_pubnub
to process gcm notifications using unity need third party asset ones here (currently our unity sdk doesn’t have feature):
- how receive message when app in background? (android, unity, gcm)
- http://forum.unity3d.com/threads/released-utnotifications-professional-cross-platform-push-notifications-and-more.333045/
- https://github.com/kobakei/unity-gcm
- http://forum.unity3d.com/threads/google-cloud-messaging-for-android-using-unity.177747/
or develop “service” keep running in background, using java, process notification , pass unity app. need service outside unity because unity apps killed when in background (runinbackground unreliable on mobile devices).
Comments
Post a Comment