Advertisement
Fahim_7861

notification

Sep 20th, 2021
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. @app.task(name='task_send_exam_start_notification')
  2. def task_job():
  3.  
  4.  
  5. fcm_helper = FCMHelper()
  6.  
  7. request_body = {
  8. "message": {
  9. "android": {
  10. "data": {
  11.  
  12. },
  13. "notification": {
  14. "title": "job notification",
  15. "body": "hello saima",
  16. "clickAction": "com.hellobcs.job_preparation.screens.job_details.JobDetailsActivity"
  17. }
  18. },
  19. "data": {
  20. "job_id": str(1),
  21. "image_url": None
  22. },
  23. "token": "eZkHheLyRuC8CKXD1vwpF7:APA91bH-8jaUnd4i0GfVeMwgtu6RjFeRafb0Kyp7sCY99NFulX-NuAGWC3AZGmgK8i_MUPshMHvcgCpnJ8Eu8sEhl-y0fJJiy2ZEeAP8rw5cVCUj-OTMK78Vel2cI9eNuL_n3DuM8AlX"
  24.  
  25.  
  26.  
  27.  
  28.  
  29. }
  30. }
  31.  
  32. fcm_helper.send_notification(request_body=request_body)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement