Kaynağa Gözat

Merge branch 'feature/zkp_5.2.0' into feature/适配Google

# Conflicts:
#	uchat_room/build.gradle
zwp 4 yıl önce
ebeveyn
işleme
efd010d494

+ 3 - 3
build.gradle

@@ -65,9 +65,9 @@ allprojects {
                 password MAVEN_PASSWORD
             }
         }
-        maven {
-            url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks'
-        }
+//        maven {
+//            url 'https://dl.bintray.com/linkedme2016/lkme-deeplinks'
+//        }
 //        // 私有仓库地址
 //        maven { url "http://lib.gcssloop.com/repository/gcssloop-central/" }
 

+ 1 - 1
uchat_room/build.gradle

@@ -131,7 +131,7 @@ dependencies {
     implementation 'com.shanp.android:youqi-safetychecker:1.0.0'
     implementation 'com.shanp.android:youqi-room-ui:1.0.1'
 
-    implementation 'com.shanp.android:youqi-room-core:1.3.36'
+    implementation 'com.shanp.android:youqi-room-core:1.3.40'
 
     implementation 'com.android.support.constraint:constraint-layout:1.1.3'
     implementation 'com.ogaclejapan.smarttablayout:library:2.0.0@aar'

+ 6 - 6
uchat_room/src/main/AndroidManifest.xml

@@ -165,9 +165,9 @@
             android:value="UChat" />
 
         <!-- LinkedMe####################################################配置 -->
-        <meta-data
-            android:name="linkedme.sdk.key"
-            android:value="6b8e04f5af57c4ef4f70f88e0fefba52" />
+<!--        <meta-data-->
+<!--            android:name="linkedme.sdk.key"-->
+<!--            android:value="6b8e04f5af57c4ef4f70f88e0fefba52" />-->
 
         <!-- LinkedMe####################################################配置 -->
 
@@ -420,9 +420,9 @@
             android:name="com.hncx.xxm.ui.launch.activity.HNCXMiddleActivity"
             android:noHistory="true"
             android:screenOrientation="portrait">
-            <meta-data
-                android:name="linkedme.sdk.auto_link_keys"
-                android:value="linkedme" />
+<!--            <meta-data-->
+<!--                android:name="linkedme.sdk.auto_link_keys"-->
+<!--                android:value="linkedme" />-->
         </activity>
         <activity
             android:name="com.hncx.xxm.room.HNCXAVRoomActivity"

+ 6 - 0
uchat_room/src/main/java/com/hncx/xxm/room/avroom/widget/HNCXMessageView.java

@@ -25,6 +25,7 @@ import androidx.annotation.NonNull;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.blankj.utilcode.util.CollectionUtils;
 import com.blankj.utilcode.util.SpanUtils;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
@@ -263,6 +264,11 @@ public class HNCXMessageView extends FrameLayout {
 
     private void initData() {
         List<ChatRoomMessage> messages = IMNetEaseManager.get().messages;
+        List<ChatRoomMessage> textMsgHistoryList = AvRoomDataManager.get().textMsgHistoryList;
+        if (!CollectionUtils.isEmpty(textMsgHistoryList)) {
+            messages.addAll(textMsgHistoryList);
+        }
+
         mMessageAdapter.setNewData(new CopyOnWriteArrayList<>());
         if (!ListUtils.isListEmpty(messages)) {
             messages = msgFilter(messages);

+ 43 - 53
uchat_room/src/main/java/com/hncx/xxm/ui/launch/activity/HNCXMiddleActivity.java

@@ -1,18 +1,8 @@
 package com.hncx.xxm.ui.launch.activity;
 
 import android.os.Bundle;
-import android.util.Log;
 
 import com.hncx.xxm.base.activity.HNCXBaseActivity;
-import com.microquation.linkedme.android.LinkedME;
-import com.microquation.linkedme.android.util.LinkProperties;
-import com.tongdaxing.xchat_core.linked.ILinkedCore;
-import com.tongdaxing.xchat_core.linked.LinkedInfo;
-import com.tongdaxing.xchat_framework.coremanager.CoreManager;
-import com.tongdaxing.xchat_framework.util.config.SpEvent;
-import com.tongdaxing.xchat_framework.util.util.SpUtils;
-
-import java.util.HashMap;
 
 /**
  * Created by chenran on 2017/8/5.
@@ -23,48 +13,48 @@ public class HNCXMiddleActivity extends HNCXBaseActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        if (getIntent() != null) {
-            //获取与深度链接相关的值
-            LinkProperties linkProperties = getIntent().getParcelableExtra(LinkedME.LM_LINKPROPERTIES);
-            if (linkProperties != null) {
-                String linkerMeChannel = linkProperties.getChannel();
-                Log.i("LinkedME-Demo", "Channel " + linkerMeChannel);
-                Log.i("LinkedME-Demo", "control params " + linkProperties.getControlParams());
-                Log.i("LinkedME-Demo", "link(深度链接) " + linkProperties.getLMLink());
-                Log.i("LinkedME-Demo", "是否为新安装 " + linkProperties.isLMNewUser());
-                //获取自定义参数封装成的hashmap对象,参数键值对由集成方定义
-                HashMap<String, String> hashMap = linkProperties.getControlParams();
-                //根据key获取传入的参数的值,该key关键字View可为任意值,由集成方规定,请与web端商议,一致即可
-
-
-                LinkedInfo linkedInfo = new LinkedInfo();
-                linkedInfo.setNewUser(linkProperties.isLMNewUser());
-                String roomuid = hashMap.get("roomuid");
-                String uid = hashMap.get("uid");
-
-
-                String channel = hashMap.get("linkedmeChannel");
-                String type = hashMap.get("type");
-                Log.i("LinkedME-Demo", "roomuid:" + roomuid + " uid:" + uid + " type:" + type);
-                if (roomuid != null) {
-                    linkedInfo.setRoomUid(roomuid);
-                }
-                if (uid != null) {
-                    SpUtils.put(HNCXMiddleActivity.this, SpEvent.linkedMeShareUid, uid);
-                    linkedInfo.setUid(uid);
-                }
-                if (type != null) {
-                    linkedInfo.setType(type);
-                }
-                if (channel != null) {
-                    SpUtils.put(HNCXMiddleActivity.this, SpEvent.linkedMeChannel, channel);
-                    //UmengEventUtil.getInstance().onLinkedMeChannel(this,channel);
-                }
-//                toast("linkedMe数据返回--->" + uid);
-                CoreManager.getCore(ILinkedCore.class).setLinkedInfo(linkedInfo);
-
-            }
-        }
-        finish();
+//        if (getIntent() != null) {
+//            //获取与深度链接相关的值
+//            LinkProperties linkProperties = getIntent().getParcelableExtra(LinkedME.LM_LINKPROPERTIES);
+//            if (linkProperties != null) {
+//                String linkerMeChannel = linkProperties.getChannel();
+//                Log.i("LinkedME-Demo", "Channel " + linkerMeChannel);
+//                Log.i("LinkedME-Demo", "control params " + linkProperties.getControlParams());
+//                Log.i("LinkedME-Demo", "link(深度链接) " + linkProperties.getLMLink());
+//                Log.i("LinkedME-Demo", "是否为新安装 " + linkProperties.isLMNewUser());
+//                //获取自定义参数封装成的hashmap对象,参数键值对由集成方定义
+//                HashMap<String, String> hashMap = linkProperties.getControlParams();
+//                //根据key获取传入的参数的值,该key关键字View可为任意值,由集成方规定,请与web端商议,一致即可
+//
+//
+//                LinkedInfo linkedInfo = new LinkedInfo();
+//                linkedInfo.setNewUser(linkProperties.isLMNewUser());
+//                String roomuid = hashMap.get("roomuid");
+//                String uid = hashMap.get("uid");
+//
+//
+//                String channel = hashMap.get("linkedmeChannel");
+//                String type = hashMap.get("type");
+//                Log.i("LinkedME-Demo", "roomuid:" + roomuid + " uid:" + uid + " type:" + type);
+//                if (roomuid != null) {
+//                    linkedInfo.setRoomUid(roomuid);
+//                }
+//                if (uid != null) {
+//                    SpUtils.put(HNCXMiddleActivity.this, SpEvent.linkedMeShareUid, uid);
+//                    linkedInfo.setUid(uid);
+//                }
+//                if (type != null) {
+//                    linkedInfo.setType(type);
+//                }
+//                if (channel != null) {
+//                    SpUtils.put(HNCXMiddleActivity.this, SpEvent.linkedMeChannel, channel);
+//                    //UmengEventUtil.getInstance().onLinkedMeChannel(this,channel);
+//                }
+////                toast("linkedMe数据返回--->" + uid);
+//                CoreManager.getCore(ILinkedCore.class).setLinkedInfo(linkedInfo);
+//
+//            }
+//        }
+//        finish();
     }
 }

+ 9 - 11
uchat_room/src/main/java/com/shanp/youqi/room/RoomBuilder.java

@@ -6,9 +6,7 @@ import android.net.http.HttpResponseCache;
 
 import com.bumptech.glide.request.target.ViewTarget;
 import com.hncx.xxm.reciever.HNCXConnectiveChangedReceiver;
-import com.hncx.xxm.ui.launch.activity.HNCXMiddleActivity;
 import com.llew.huawei.verifier.LoadedApkHuaWei;
-import com.microquation.linkedme.android.LinkedME;
 import com.shanp.youqi.base.util.LogUtil;
 import com.squareup.leakcanary.RefWatcher;
 import com.tongdaxing.erban.R;
@@ -71,7 +69,7 @@ public class RoomBuilder {
         BasicConfig.INSTANCE.setCacheDir(Constants.CACHE_DIR);
         //Pingpp.DEBUG = BasicConfig.INSTANCE.isDebuggable();
 
-        UriProvider.init("http://" + host, "ws://" + host + ":3006");
+        UriProvider.init("https://" + host, "ws://" + host + ":3006");
         OkHttpManager.getInstance().init(context, BasicConfig.INSTANCE.isDebuggable());
 
         //initNimUIKit();
@@ -79,7 +77,7 @@ public class RoomBuilder {
         //设置HTTP缓存
         setHttpCache(context);
         //设置debug模式下打印LinkedME日志
-        setLinkedMeDebug(context);
+//        setLinkedMeDebug(context);
         //设置bugly
         //setBugly();
         //友盟统计
@@ -137,13 +135,13 @@ public class RoomBuilder {
     }
 
     private static void setLinkedMeDebug(Context context) {
-        if (BasicConfig.INSTANCE.isDebuggable()) {
-            LinkedME.getInstance(context).setDebug();
-        } else {
-            LinkedME.getInstance(context);
-        }
-        LinkedME.getInstance().setImmediate(false);
-        LinkedME.getInstance().setHandleActivity(HNCXMiddleActivity.class.getName());
+//        if (BasicConfig.INSTANCE.isDebuggable()) {
+//            LinkedME.getInstance(context).setDebug();
+//        } else {
+//            LinkedME.getInstance(context);
+//        }
+//        LinkedME.getInstance().setImmediate(false);
+//        LinkedME.getInstance().setHandleActivity(HNCXMiddleActivity.class.getName());
     }
 
     private static void initRxNet(Context context, String url) {