Google Cloud Messaging and Synchronization Standardization

Asked

Viewed 79 times

1

I am 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 makes his registration who will request the first data of the server will be the client, and after the user is registered who will request new information will be the Google Cloud Messaging. But I was wondering if it wouldn’t be interesting right after the user registered on the system, the GCM was the one who sent the initial information and system settings to the client, leaving the code responsible for the synchronizations all in one place, in this case, in the logic of GCM, but I do not know if with this way it would take for the user to have the first access to the system.

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

If you have examples about standardization with Apis, mainly from GCM, as for other business rules of a system I also thank you.

1 answer

1


After the user has completed the registration there may be a certain delay while the application registers with GCM, passes to your server the Registration id and your server sends the first push notification. I would say that it is a delay more or less of the same order as the Whatsapp to receive the confirmation SMS of the user’s number at the time of the first use (disregarding that the communication technologies involved are different). It might be worth it for you that the app waits for that 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 make the application request this data in two situations: after the user makes the registration and whenever the application receives a push notification (that 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 synchronization.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.