Google Cloud Messaging and Synchronization Standardization

1

I'm building a project that will use Google's GCM, something new in my projects, and I would like to know the following.

At the time the user registers who will request the first data from the server will be the client, and after the user is registered who will request new information will be Google Cloud Messaging. But I would like to know if it would not be interesting soon after the user registered in the system, GCM was the one who sent the initial system information and configurations to the client, leaving the code responsible for the synchronizations all in one place, in this case, in the but I do not know if it would take the user to access the system first.

You also have another option, to create a Java file in which you are called from the business rule of both the call from server to client, and from client to server.

If you have examples on standardization with APIs, especially from GCM, as for other business rules of a system, I also thank you.

    
asked by anonymous 04.08.2015 / 15:47

1 answer

1

After the user has completed the registration, there may be a certain delay while the application registers with GCM, it passes its Registration id server to its server and its server sends the first push notification. I would say that it is a delay of about the same order that it takes the WhatsApp to receive the SMS of confirmation of the user's number at the time of first use (disregarding that the communication technologies involved are different) . It may be worth it for the application to wait for this first push notification or not.

As you said, the alternative would be to centralize the business rule that requests the data in the form of a Web Service , and have the application request this data in two situations: after the user registers and whenever the application receives a push notification (which would simply be a ping warning that there is something new on the server, without specifying what). In both cases the procedure would be the same: call the Web Service .

    
04.08.2015 / 16:07