1

I like to write a program in android that sent notification from web to android application. I hear that there are two types of communication is possible in Web to android. One is Using GCM and (Google Cloud Messaging) and other is using Web service communication. So i like to know that is there GCM(Google Cloud Messaging) have any advantage over web service communication in android programming.

ViLLaN
  • 81
  • 1
  • 1
  • 6

2 Answers2

2

Web service communication is useful if want to send or receive large data for communication.

And GCM notification help to start web service. So if receive notification in android then start web service to fetch data from web.

Govinda P
  • 3,261
  • 5
  • 22
  • 43
0

In Android 6 (or above) there is a big pro to use GCM. High priority GCM message is the only way to wake a phone from doze mode. If you need to send small text (up to 4KB) I really suggest you to use GCM.

greywolf82
  • 21,813
  • 18
  • 54
  • 108