I have a android client app, and my server is in django.
I want to implement push-notifications in the server, to notify the specific users when changes in data related to them are happening, for example.
I have found those links:
- https://django-gcm.readthedocs.org/en/latest/quickstart.html
- https://github.com/bogdal/django-gcm
- https://github.com/jleclanche/django-push-notifications
Not really sure what which link I need and for what.
An example for what I want is:
A user makes a request to server and changes data, and the server sends a push notification to another user.
So what package should I install? and maybe any tutorials to follow?? I am looking for any info to help me.
thanks a lot!
--- EDIT ----
So I did as e4c5 suggested, and I have a table which contains Device ID coupled with user.
I register the device to the GCM when app is installed.
I am also adding the Device_id to the table in my database (with the user field being null for now) and save the Device_id in my client app as well.
Now, when a user logs in, I send a request to my server which couples the logged in user with the Device ID.
When the user logs out - the user field is null again.
Problem is - if UserA is currently logged out (not in my database) but should receive a notification - my server will look at the database -> Devices IDs table and wouldn't find the userA in any of the user fields (because he is currently logged out).
As a result - the notification will be lost (my server would not send it to the GCM).
Best would be if when the user logs in again, he will get all the notifications that were sent to him while he was logged out.
How can I do this?
thanks!