Pregunta

I'm developing an application for a journal, which must allow the user to view the latest news on your Android smartphone, the news is retrieved directly from the database of the editorial.

Now i would implement a system that allows push notifications to alert user every time that someone insert a news in a certain database table, I'll explain:

In the database there is a table called "breaking news", every time that the editorial insert a new news in this table have to get a push notification to the user.

How can I do?

Do I have to use GCM?

¿Fue útil?

Solución

Yes, you have to use GCM system and your server has to send special GCM to every registered device on that event (every time that someone insert a news in a certain database table). The scenario is as follows:
every device which is using your app has to register on your server to be able to receive GCMs
if users are able to add news then your app has to send such news to the server and then server will send GCM to all devices.
it news adding is a task for some web service only then it a bit easier cuz you don't need to send it from app to server but still your server should send GCM on news adding event

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top