简体   繁体   中英

django push notification to android using django-push-notifications library

I have an android application with a backend web application developed in django.

I am using django-push-notification library to enable push notification in my django backend application.

In the android application I send the registration id to the backend django application and it is stored in the DB successfully.

When I try to send the test message from the admin area, I got a confirmation that all messages are sent but I did not receive any message on my android application.

I suspected the android application but I wrote some code to test the application receiver and it worked fine, so I think the problem is in the django application.

Is there any method to make sure that the messages sent from the django app is received by the google cloud messaging service ?

I worked with GCM and django-push-notification long time ago. Although I do no clearly remember, but you can try something like:

  • Check the response from GCM after django send message.
  • Make sure that your android app use the right key for getting the message body( I remember that django-push-notification use msg key)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM