Browse Source

小米推送铃声

peng 1 year ago
parent
commit
7b2910baaf
2 changed files with 5 additions and 20 deletions
  1. 5 10
      Service/DevicePushService.py
  2. 0 10
      Service/PushService.py

+ 5 - 10
Service/DevicePushService.py

@@ -319,7 +319,10 @@ class DevicePushService:
                         huawei_push_object = HuaweiPushObject()
                         huawei_push_object.send_push_notify_message(**kwargs)
                     elif push_type == 4:  # android xmpush
-                        channel_id = 104551
+                        if param['event_type'] in [606, 607]:
+                            channel_id = 111934
+                        else:
+                            channel_id = 104551
                         result['do_xmpush_code'] = cls.do_xmpush(channel_id=channel_id, **kwargs)
                     elif push_type == 5:  # android vivopush
                         result['do_vivopush_code'] = PushObject.android_vivopush(**kwargs)
@@ -543,15 +546,7 @@ class DevicePushService:
             'extra.channel': channel,
         }
         if event_type in [606, 607]:
-            data['extra.notification_style_type'] = 1
-            data['extra.notification_style_button_left_name'] = '接听'
-            data['extra.notification_style_button_left_notify_effect'] = 2
-            data[
-                'extra.notification_style_button_left_intent_class'] = 'com.ansjer.zccloud_a.AJ_MainView.AJ_Home.AJMainActivity'
-            data['extra.notification_style_button_right_name'] = '挂断'
-            data['extra.notification_style_button_right_notify_effect'] = 2
-            data[
-                'extra.notification_style_button_right_intent_class'] = 'com.ansjer.zccloud_a.AJ_MainView.AJ_Home.AJMainActivity'
+            data['extra.sound_uri'] = 'android.resource://com.ansjer.zccloud_ab/raw/phone_call'
         headers = {
             'Authorization': 'key={}'.format(app_secret)
         }

+ 0 - 10
Service/PushService.py

@@ -263,16 +263,6 @@ class PushObject:
                 'extra.uid': uid,
                 'extra.channel': channel,
             }
-            if event_type in [606, 607]:
-                data['extra.notification_style_type'] = 1
-                data['extra.notification_style_button_left_name'] = '接听'
-                data['extra.notification_style_button_left_notify_effect'] = 2
-                data[
-                    'extra.notification_style_button_left_intent_class'] = 'com.ansjer.zccloud_a.AJ_MainView.AJ_Home.AJMainActivity'
-                data['extra.notification_style_button_right_name'] = '挂断'
-                data['extra.notification_style_button_right_notify_effect'] = 2
-                data[
-                    'extra.notification_style_button_right_intent_class'] = 'com.ansjer.zccloud_a.AJ_MainView.AJ_Home.AJMainActivity'
             # if image:
             #     data['extra.notification_style_type'] = 2
             #     data['extra.notification_bigPic_uri'] = image