Jelajahi Sumber

修改推送配置信息

Pq 2 tahun lalu
induk
melakukan
7747cfa7b4

TEMPAT SAMPAH
pepk.jar


+ 24 - 22
rong_im/kit/src/main/res/layout/rc_conversationlist_item.xml

@@ -25,32 +25,34 @@
                 android:layout_height="@dimen/rc_conversation_portrait_size"
                 app:qmui_corner_radius="@dimen/dp_6"
                 android:scaleType="centerCrop" />
+        </RelativeLayout>
 
+        <RelativeLayout
+            app:layout_constraintCircleAngle="45"
+            app:layout_constraintCircleRadius="28dp"
+            app:layout_constraintCircle="@+id/rc_conversation_portrait_rl"
+            android:id="@+id/rc_conversation_unread"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentEnd="true">
 
-            <RelativeLayout
-                android:id="@+id/rc_conversation_unread"
+            <ImageView
+                android:id="@+id/rc_conversation_unread_bg"
+                android:layout_width="16dp"
+                android:layout_height="16dp"
+                android:layout_centerInParent="true"
+                app:srcCompat="@drawable/rc_unread_count_bg_normal" />
+
+            <TextView
+                android:id="@+id/rc_conversation_unread_count"
+                style="@style/TextStyle.Alignment"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_alignParentTop="true"
-                android:layout_alignParentEnd="true">
-
-                <ImageView
-                    android:id="@+id/rc_conversation_unread_bg"
-                    android:layout_width="16dp"
-                    android:layout_height="16dp"
-                    android:layout_centerInParent="true"
-                    app:srcCompat="@drawable/rc_unread_count_bg_normal" />
-
-                <TextView
-                    android:id="@+id/rc_conversation_unread_count"
-                    style="@style/TextStyle.Alignment"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerInParent="true"
-                    android:text="15"
-                    android:textColor="@color/rc_white_color"
-                    android:textSize="@dimen/rc_font_auxiliary_size" />
-            </RelativeLayout>
+                android:layout_centerInParent="true"
+                android:text="15"
+                android:textColor="@color/rc_white_color"
+                android:textSize="@dimen/rc_font_auxiliary_size" />
         </RelativeLayout>
 
         <TextView

+ 12 - 12
student/agconnect-services.json

@@ -26,21 +26,21 @@
 		"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
 	},
 	"client":{
-		"cp_id":"890086000300075951",
-		"product_id":"99536292102459090",
-		"client_id":"930917118826802304",
-		"client_secret":"A3D73ECCF4A7C4686D91301F497C84C3F69316343D31055DEB29B4407C4E1C86",
-		"project_id":"99536292102459090",
-		"app_id":"106640053",
-		"api_key":"DAEDAKeTTEged4qd78KGMfb7pRvlD8jFsAZMSdRjhBOluUd+Cw/rcDa4k8XLHAGP1Heid4ULkVuDdgUqnb0cpiJ/dIBfyXCythQuYg==",
+		"cp_id":"30086000567068905",
+		"product_id":"99536292102482610",
+		"client_id":"938407329190136960",
+		"client_secret":"ADB658B418784CD85714B88E04A07E001780183E705921831D28E835C0ECB692",
+		"project_id":"99536292102482610",
+		"app_id":"106707955",
+		"api_key":"DAEDAGkmRNtTTH8nSFQhcHcPLy2Iu75iXCbPAkkQt2yxCKog9dajFHVB1v80u+hAjsDpfpr8imeEP2Xv12ctxbeek8ngA0o0FpzW8Q==",
 		"package_name":"com.cooleshow.student"
 	},
 	"oauth_client":{
-		"client_id":"106640053",
+		"client_id":"106707955",
 		"client_type":1
 	},
 	"app_info":{
-		"app_id":"106640053",
+		"app_id":"106707955",
 		"package_name":"com.cooleshow.student"
 	},
 	"service":{
@@ -77,15 +77,15 @@
 		{
 			"package_name":"com.cooleshow.student",
 			"client":{
-				"app_id":"106640053"
+				"app_id":"106707955"
 			},
 			"app_info":{
 				"package_name":"com.cooleshow.student",
-				"app_id":"106640053"
+				"app_id":"106707955"
 			},
 			"oauth_client":{
 				"client_type":1,
-				"client_id":"106640053"
+				"client_id":"106707955"
 			}
 		}
 	]

+ 34 - 6
student/src/main/AndroidManifest.xml

@@ -30,6 +30,7 @@
         <meta-data
             android:name="design_width_in_dp"
             android:value="375" />
+
         <activity
             android:name=".ui.splash.SplashActivity"
             android:exported="true"
@@ -41,6 +42,7 @@
             <intent-filter>
                 <!--colexiustudent://html:8888/SplashActivity?url=10011002-->
                 <action android:name="android.intent.action.VIEW" />
+
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.BROWSABLE" />
 
@@ -62,8 +64,8 @@
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:exported="false"
             android:launchMode="singleTask"
-            android:windowSoftInputMode="adjustPan"
-            android:screenOrientation="portrait" >
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan">
             <intent-filter>
                 <!-- 这个action是给极光推送跳转的 oppo推送要求push的intent-filter应与其他功能的intent-filter区分开,勿添加其他action与data标签-->
                 <action android:name="cn.jiguang.push.customAction" />
@@ -296,7 +298,30 @@
                 <action android:name="com.huawei.push.action.MESSAGING_EVENT" />
             </intent-filter>
         </service>
-        <!-- 融云开始 -->
+
+        <meta-data
+            android:name="com.huawei.hms.client.appid"
+            android:value="106707955" />
+
+        <service
+            android:name="com.cooleshow.student.ui.live.floatPop.FloatingWindowService"
+            android:exported="false" />
+
+        <!--融云push start-->
+        <receiver
+            android:name="com.cooleshow.student.push.CustomMiMessageReceiver"
+            android:exported="true">
+            <intent-filter>
+                <action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="com.xiaomi.mipush.MESSAGE_ARRIVED" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="com.xiaomi.mipush.ERROR" />
+            </intent-filter>
+        </receiver>
+
         <receiver
             android:name=".push.SealNotificationReceiver"
             android:exported="true">
@@ -307,9 +332,12 @@
             </intent-filter>
         </receiver>
 
-        <service
-            android:name="com.cooleshow.student.ui.live.floatPop.FloatingWindowService"
-            android:exported="false" />
+        <!--vivo-->
+        <receiver android:name="com.cooleshow.student.push.VivoPushReceiver">
+            <intent-filter>
+                <action android:name="com.vivo.pushclient.action.RECEIVE" />
+            </intent-filter>
+        </receiver>
     </application>
 
 </manifest>

+ 1 - 1
student/src/main/java/com/cooleshow/student/App.java

@@ -116,7 +116,7 @@ public class App extends BaseApplication {
 
     private void initRong() {
         PushConfig config = new PushConfig.Builder()
-                .enableMiPush("2882303761520170306", "5802017024306")
+                .enableMiPush("2882303761520172242", "5692017221242")
                 .enableOppoPush("5b2b716e774c45f2bd9a90b242b295e9", "3f1d849d8bce4273be48ca08a2ce320b")
                 .enableHWPush(true)
                 .enableVivoPush(true)

+ 47 - 0
student/src/main/java/com/cooleshow/student/push/CustomMiMessageReceiver.java

@@ -0,0 +1,47 @@
+package com.cooleshow.student.push;
+
+import android.content.Context;
+
+import com.xiaomi.mipush.sdk.MiPushCommandMessage;
+import com.xiaomi.mipush.sdk.MiPushMessage;
+
+import cn.jpush.android.service.PluginHuaweiPlatformsService;
+import cn.jpush.android.service.PluginXiaomiPlatformsReceiver;
+import io.rong.push.platform.mi.MiMessageReceiver;
+
+/**
+ * Author by pq, Date on 2022/7/18.
+ */
+public class CustomMiMessageReceiver extends MiMessageReceiver {
+    final PluginXiaomiPlatformsReceiver jpushService = new PluginXiaomiPlatformsReceiver();
+
+    @Override
+    public void onNotificationMessageArrived(Context context, MiPushMessage message) {
+        super.onNotificationMessageArrived(context, message);
+        jpushService.onNotificationMessageArrived(context, message);
+    }
+
+    @Override
+    public void onNotificationMessageClicked(Context context, MiPushMessage message) {
+        super.onNotificationMessageClicked(context, message);
+        jpushService.onNotificationMessageClicked(context, message);
+    }
+
+    @Override
+    public void onReceiveRegisterResult(Context context, MiPushCommandMessage message) {
+        super.onReceiveRegisterResult(context, message);
+        jpushService.onReceiveRegisterResult(context, message);
+    }
+
+    @Override
+    public void onReceivePassThroughMessage(Context context, MiPushMessage message) {
+        super.onReceivePassThroughMessage(context, message);
+        jpushService.onReceivePassThroughMessage(context, message);
+    }
+
+    @Override
+    public void onCommandResult(Context context, MiPushCommandMessage message) {
+        super.onCommandResult(context, message);
+        jpushService.onCommandResult(context, message);
+    }
+}

+ 0 - 13
student/src/main/java/com/cooleshow/student/push/HuaWeiHMSReceiver.java

@@ -1,13 +0,0 @@
-package com.cooleshow.student.push;
-
-/**
- * Description:
- * Copyright  : Copyright (c) 2019
- * Company    : 大雅乐盟
- * Author     : r
- * Date       : 2019/10/29 16:51
- * extends HMSReceiver
- */
-public class HuaWeiHMSReceiver  {
-
-}

+ 2 - 1
student/src/main/java/com/cooleshow/student/push/MyHWPushService.java

@@ -4,8 +4,9 @@ import com.huawei.hms.push.HmsMessageService;
 import com.huawei.hms.push.RemoteMessage;
 
 import cn.jpush.android.service.PluginHuaweiPlatformsService;
+import io.rong.push.platform.hms.HMSPushService;
 
-public class MyHWPushService extends HmsMessageService {
+public class MyHWPushService extends HMSPushService {
 
       final PluginHuaweiPlatformsService jpushService = new PluginHuaweiPlatformsService();
 

+ 3 - 16
student/src/main/java/com/cooleshow/student/push/SealNotificationReceiver.java

@@ -4,6 +4,8 @@ package com.cooleshow.student.push;
 import android.content.Context;
 import android.os.Build;
 
+import com.cooleshow.base.utils.LogUtils;
+
 import io.rong.push.PushType;
 import io.rong.push.notification.PushMessageReceiver;
 import io.rong.push.notification.PushNotificationMessage;
@@ -20,22 +22,7 @@ public class SealNotificationReceiver extends PushMessageReceiver {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
             return false;
         }
-        try {
-//            if (ActivityManager.getInstance().isOpenActivity(MainActivity.class)) {
-//                MainActivity mainActivity = MainActivity.instance;
-//                if (mainActivity != null) {
-//                    mainActivity.startActivity("rongIM");
-//                }
-//            } else {
-//                Intent i = new Intent(context, HtmlActivity.class);
-//                i.putExtra("memo", "rongIM");
-//                i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-//                context.startActivity(i);
-//            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
+        LogUtils.i("pq","SealNotificationReceiver Clicked");
         return false;// 返回 false, 会走融云 SDK 默认处理逻辑, 即点击该通知会打开会话列表或会话界面; 返回 true, 则由您自定义处理逻辑。
     }
 }

+ 36 - 0
student/src/main/java/com/cooleshow/student/push/VivoPushReceiver.java

@@ -0,0 +1,36 @@
+package com.cooleshow.student.push;
+
+import android.content.Context;
+
+import com.vivo.push.model.UPSNotificationMessage;
+import com.vivo.push.model.UnvarnishedMessage;
+
+import cn.jpush.android.service.PluginHuaweiPlatformsService;
+import cn.jpush.android.service.PluginOppoPushService;
+import cn.jpush.android.service.PluginVivoMessageReceiver;
+import io.rong.push.platform.vivo.VivoPushMessageReceiver;
+
+/**
+ * Author by pq, Date on 2022/7/18.
+ */
+public class VivoPushReceiver extends VivoPushMessageReceiver {
+    final PluginVivoMessageReceiver mPluginOppoPushService =new PluginVivoMessageReceiver();
+    @Override
+    public void onNotificationMessageClicked(Context context, UPSNotificationMessage message) {
+        super.onNotificationMessageClicked(context, message);
+        mPluginOppoPushService.onNotificationMessageClicked(context,message);
+    }
+
+    @Override
+    public void onReceiveRegId(Context context, String token) {
+        super.onReceiveRegId(context, token);
+        mPluginOppoPushService.onReceiveRegId(context,token);
+    }
+
+    @Override
+    public void onTransmissionMessage(Context context, UnvarnishedMessage unvarnishedMessage) {
+        super.onTransmissionMessage(context, unvarnishedMessage);
+        mPluginOppoPushService.onTransmissionMessage(context,unvarnishedMessage);
+    }
+
+}

+ 12 - 12
teacher/agconnect-services.json

@@ -26,21 +26,21 @@
 		"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
 	},
 	"client":{
-		"cp_id":"890086000300075951",
-		"product_id":"99536292102459120",
-		"client_id":"930923350119697856",
-		"client_secret":"357D4BC4E1EDDAC67291848C5F442034C679BFEC080C8668B0E57F09F14C226C",
-		"project_id":"99536292102459120",
-		"app_id":"106640105",
-		"api_key":"DAEDAF87SRo4sNbJG4FSvPeJ3AdQX8zIt3HFGxOy8/y1hMPaQ5dgIgGv1otMOSbfFHrB8k4S9Pu/v44ytx2gfPojd17p+nUvPlqMyQ==",
+		"cp_id":"30086000567068905",
+		"product_id":"99536292102482640",
+		"client_id":"938410955576995328",
+		"client_secret":"7D7B7215F4ADC091FA9D149DA6D3DF5DD91A5A71FA211AF25BE97971B79ED8EE",
+		"project_id":"99536292102482640",
+		"app_id":"106707979",
+		"api_key":"DAEDAGtmq8LFTRDbNFfCBrSGOnM05zYlY8b6GjOmzTAyrpR/Cb6XiRkQJUXCxHQM7qNhxo8mnVqhJ+y/MmliOFn60cPT0CgIW03b0Q==",
 		"package_name":"com.cooleshow.teacher"
 	},
 	"oauth_client":{
-		"client_id":"106640105",
+		"client_id":"106707979",
 		"client_type":1
 	},
 	"app_info":{
-		"app_id":"106640105",
+		"app_id":"106707979",
 		"package_name":"com.cooleshow.teacher"
 	},
 	"service":{
@@ -77,15 +77,15 @@
 		{
 			"package_name":"com.cooleshow.teacher",
 			"client":{
-				"app_id":"106640105"
+				"app_id":"106707979"
 			},
 			"app_info":{
 				"package_name":"com.cooleshow.teacher",
-				"app_id":"106640105"
+				"app_id":"106707979"
 			},
 			"oauth_client":{
 				"client_type":1,
-				"client_id":"106640105"
+				"client_id":"106707979"
 			}
 		}
 	]

+ 23 - 1
teacher/src/main/AndroidManifest.xml

@@ -70,7 +70,7 @@
         <activity
             android:name=".ui.main.MainActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
-            android:exported="false"
+            android:exported="true"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustPan" >
@@ -380,6 +380,20 @@
             </intent-filter>
         </service>
         <!-- 融云开始 -->
+        <!--小米-->
+        <receiver
+            android:name=".push.CustomMiMessageReceiver"
+            android:exported="true">
+            <intent-filter>
+                <action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="com.xiaomi.mipush.MESSAGE_ARRIVED" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="com.xiaomi.mipush.ERROR" />
+            </intent-filter>
+        </receiver>
         <receiver
             android:name=".push.SealNotificationReceiver"
             android:exported="true">
@@ -389,6 +403,14 @@
                 <action android:name="io.rong.push.intent.THIRD_PARTY_PUSH_STATE" />
             </intent-filter>
         </receiver>
+
+
+        <!--vivo-->
+        <receiver android:name=".push.VivoPushReceiver">
+            <intent-filter>
+                <action android:name="com.vivo.pushclient.action.RECEIVE" />
+            </intent-filter>
+        </receiver>
     </application>
 
 </manifest>

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/App.java

@@ -116,7 +116,7 @@ public class App extends BaseApplication {
 
     private void initRong() {
         PushConfig config = new PushConfig.Builder()
-                .enableMiPush("2882303761520170311", "5592017040311")
+                .enableMiPush("2882303761520172302", "5102017284302")
                 .enableOppoPush("e2e0eff48d6145c0b9f87cd6a57636ad", "519726bf2dfc4a6c95a6e00d61e47f10")
                 .enableHWPush(true)
                 .enableVivoPush(true)

+ 48 - 0
teacher/src/main/java/com/cooleshow/teacher/push/CustomMiMessageReceiver.java

@@ -0,0 +1,48 @@
+package com.cooleshow.teacher.push;
+
+import android.content.Context;
+
+import com.cooleshow.base.utils.LogUtils;
+import com.xiaomi.mipush.sdk.MiPushCommandMessage;
+import com.xiaomi.mipush.sdk.MiPushMessage;
+
+import cn.jpush.android.service.PluginXiaomiPlatformsReceiver;
+import io.rong.push.platform.mi.MiMessageReceiver;
+
+/**
+ * Author by pq, Date on 2022/7/18.
+ */
+public class CustomMiMessageReceiver extends MiMessageReceiver {
+    final PluginXiaomiPlatformsReceiver jpushService = new PluginXiaomiPlatformsReceiver();
+
+    @Override
+    public void onNotificationMessageArrived(Context context, MiPushMessage message) {
+        super.onNotificationMessageArrived(context, message);
+        jpushService.onNotificationMessageArrived(context, message);
+    }
+
+    @Override
+    public void onNotificationMessageClicked(Context context, MiPushMessage message) {
+        super.onNotificationMessageClicked(context, message);
+        LogUtils.i("pq","onNotificationMessageClicked:"+message.getContent());
+        jpushService.onNotificationMessageClicked(context, message);
+    }
+
+    @Override
+    public void onReceiveRegisterResult(Context context, MiPushCommandMessage message) {
+        super.onReceiveRegisterResult(context, message);
+        jpushService.onReceiveRegisterResult(context, message);
+    }
+
+    @Override
+    public void onReceivePassThroughMessage(Context context, MiPushMessage message) {
+        super.onReceivePassThroughMessage(context, message);
+        jpushService.onReceivePassThroughMessage(context, message);
+    }
+
+    @Override
+    public void onCommandResult(Context context, MiPushCommandMessage message) {
+        super.onCommandResult(context, message);
+        jpushService.onCommandResult(context, message);
+    }
+}

+ 0 - 13
teacher/src/main/java/com/cooleshow/teacher/push/HuaWeiHMSReceiver.java

@@ -1,13 +0,0 @@
-package com.cooleshow.teacher.push;
-
-/**
- * Description:
- * Copyright  : Copyright (c) 2019
- * Company    : 大雅乐盟
- * Author     : r
- * Date       : 2019/10/29 16:51
- * extends HMSReceiver
- */
-public class HuaWeiHMSReceiver  {
-
-}

+ 2 - 2
teacher/src/main/java/com/cooleshow/teacher/push/MyHWPushService.java

@@ -1,11 +1,11 @@
 package com.cooleshow.teacher.push;
 
-import com.huawei.hms.push.HmsMessageService;
 import com.huawei.hms.push.RemoteMessage;
 
 import cn.jpush.android.service.PluginHuaweiPlatformsService;
+import io.rong.push.platform.hms.HMSPushService;
 
-public class MyHWPushService extends HmsMessageService {
+public class MyHWPushService extends HMSPushService {
 
       final PluginHuaweiPlatformsService jpushService = new PluginHuaweiPlatformsService();
 

+ 3 - 16
teacher/src/main/java/com/cooleshow/teacher/push/SealNotificationReceiver.java

@@ -2,8 +2,10 @@
 package com.cooleshow.teacher.push;
 
 import android.content.Context;
+import android.content.Intent;
 import android.os.Build;
 
+import com.cooleshow.base.utils.LogUtils;
 
 import io.rong.push.PushType;
 import io.rong.push.notification.PushMessageReceiver;
@@ -21,22 +23,7 @@ public class SealNotificationReceiver extends PushMessageReceiver {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
             return false;
         }
-        try {
-//            if (ActivityManager.getInstance().isOpenActivity(MainActivity.class)) {
-//                MainActivity mainActivity = MainActivity.instance;
-//                if (mainActivity != null) {
-//                    mainActivity.startActivity("rongIM");
-//                }
-//            } else {
-//                Intent i = new Intent(context, HtmlActivity.class);
-//                i.putExtra("memo", "rongIM");
-//                i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-//                context.startActivity(i);
-//            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
+        LogUtils.i("pq","SealNotificationReceiver Clicked");
         return false;// 返回 false, 会走融云 SDK 默认处理逻辑, 即点击该通知会打开会话列表或会话界面; 返回 true, 则由您自定义处理逻辑。
     }
 }

+ 34 - 0
teacher/src/main/java/com/cooleshow/teacher/push/VivoPushReceiver.java

@@ -0,0 +1,34 @@
+package com.cooleshow.teacher.push;
+
+import android.content.Context;
+
+import com.vivo.push.model.UPSNotificationMessage;
+import com.vivo.push.model.UnvarnishedMessage;
+
+import cn.jpush.android.service.PluginVivoMessageReceiver;
+import io.rong.push.platform.vivo.VivoPushMessageReceiver;
+
+/**
+ * Author by pq, Date on 2022/7/18.
+ */
+public class VivoPushReceiver extends VivoPushMessageReceiver {
+    final PluginVivoMessageReceiver mPluginOppoPushService =new PluginVivoMessageReceiver();
+    @Override
+    public void onNotificationMessageClicked(Context context, UPSNotificationMessage message) {
+        super.onNotificationMessageClicked(context, message);
+        mPluginOppoPushService.onNotificationMessageClicked(context,message);
+    }
+
+    @Override
+    public void onReceiveRegId(Context context, String token) {
+        super.onReceiveRegId(context, token);
+        mPluginOppoPushService.onReceiveRegId(context,token);
+    }
+
+    @Override
+    public void onTransmissionMessage(Context context, UnvarnishedMessage unvarnishedMessage) {
+        super.onTransmissionMessage(context, unvarnishedMessage);
+        mPluginOppoPushService.onTransmissionMessage(context,unvarnishedMessage);
+    }
+
+}

+ 0 - 8
teacher/src/main/java/com/cooleshow/teacher/push/XiaomiRongYunReceiver.java

@@ -1,8 +0,0 @@
-package com.cooleshow.teacher.push;
-
-import io.rong.push.platform.mi.MiMessageReceiver;
-
-public class XiaomiRongYunReceiver extends MiMessageReceiver {
-
-
-}