Browse Source

谷歌推送增加参数

peng 2 years ago
parent
commit
518718d573
2 changed files with 2 additions and 0 deletions
  1. 1 0
      Service/DevicePushService.py
  2. 1 0
      Service/PushService.py

+ 1 - 0
Service/DevicePushService.py

@@ -483,6 +483,7 @@ class DevicePushService:
                 "received_at": n_time, "sound": "sound.aif", "uid": uid, "zpush": "1", "channel": channel}
         result = push_service.notify_single_device(registration_id=token_val, message_title=msg_title,
                                                    message_body=msg_text, data_message=data,
+                                                   click_action='android.intent.action.VIEW',
                                                    extra_kwargs={
                                                        'default_vibrate_timings': True,
                                                        'default_sound': True,

+ 1 - 0
Service/PushService.py

@@ -163,6 +163,7 @@ class PushObject:
                          }
             result = push_service.notify_single_device(registration_id=token_val, message_title=msg_title,
                                                        message_body=msg_text, data_message=push_data,
+                                                       click_action='android.intent.action.VIEW',
                                                        extra_kwargs={'default_sound': True,
                                                                      'default_vibrate_timings': True,
                                                                      'default_light_settings': True,