PubNub GCM for Unity Android

I have successfully integrated PubNub into my Unity project. The chat function works. Now I am looking for a way to receive push notifications when the user is disconnected.

I know how GCM works. This way I can find the GCM API key and put it in the PubNub dashboard. However, on the Unity side, I suppose there should be a plugin for this, but I can't find it anywhere.

+3


source to share


1 answer


To send GCM notifications to a device:

To handle GCM notifications using unity, you need a third party asset like here (our Unity SDK does not have this feature at this time):



Or create a "service" that runs in the background using Java to handle the notification and navigate to your Unity application. You need a service outside of Unity because Unity apps are killed when they are in the background (runInBackground is unreliable on mobile).

+2


source







All Articles