Sim, correto. Porém não confunda avisar ao app que existem novos dados, como por exemplo novo e-mail, com usar o GCM como Trigger do banco de dados.
quinta-feira, 19 de Março de 2015 às 08:48:22 UTC-3, Marcelo Alves escreveu:
2015-03-19 8:43 GMT-03:00 Leonardo Malkes <leo.m...@gmail.com>:Para garantir que seus dados estejam sempre atualizados é interessante consultar o servidor. Mas para evitar consultas excessivas e recomendado que você mantenha um cache no app.Avisar ao app via push para ele se atualizar não é uma boa prática. O push não foi feito para isso.
Tirado da explicação do GCM :Google Cloud Messaging (GCM) is a free service that enables developers to send downstream messages (from servers to GCM-enabled client apps), and upstream messages (from the GCM-enabled client apps to servers). This could be a lightweight message telling the client app that there is new data to be fetched from the server (for instance, a "new email" notification informing the app that it is out of sync with the back end), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to and from the target client app.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário