android - How to avoid a user receiving his own chat gcm notification on Pubnub -


we have created chat application using pubnub api on phonegap. using common unique channel 2 users (say & b) send , receive messages.

also, in addition this, have enabled pubnub gcm notification users can receive notifications when app either in background or closed.

now when user sends pubnub message b , instantly changes application or hides it, user himself receives gcm notification oh own message.

this issue troubling us. rest working fine.

in subscribe callback, can detect if application not in foreground, , if not in foreground, return immediately?

this way, logic deliver received messages application logic doesnt fire unless in foreground... ?


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -