0

I have developed one Android app for the company which has Push Notification(GCM) as well.

When they send the notification and that time if the device is connected in their wifi network then notification doesn't come but if the device is connected to mobile network (3G/4G) then it receives the notification.

Their system admin might have blocked that web address but nobody knows exactly which address.

So, I just wanted to know which Google API gets called when notification arrives so that I can inform their System Administrator to unblock that web site/web address

Mitesh Shah
  • 192
  • 4
  • 16
  • 1
    see the answer here https://stackoverflow.com/questions/23732611/google-cloud-messaging-not-working-on-4-1-2-devices-on-a-corporate-network/23784874#23784874 – Leo Mar 25 '16 at 18:59
  • @leonziyo: yes, but in my case problems persist on newer devices with Android 5.0+ – Mitesh Shah Mar 25 '16 at 19:25

2 Answers2

1

Ask your admin to open port number 5228, 5229 & 5230. Hope this solves your problem

AbhishekB
  • 2,111
  • 3
  • 18
  • 23
0

For your question, 'What Google API gets called when notification arrives"

To receive messages, use a service that extends GcmListenerService to handle message capture by GcmReceiver.

By overriding the method GcmListenerService.onMessageReceived, you can perform actions based on the received message.

Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30