新增新用户注册后FirebaseAnalytics.logEvent调用
尝试修复美颜会闪屏问题(待观察) 修复跨机子设置备注不显示在列表上的问题 修复聊天列表会出现PK消息的问题
This commit is contained in:
parent
405909f3b3
commit
4628079ac7
@ -120,7 +120,7 @@ android {
|
||||
def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
|
||||
println "谷歌版本:" + isGooglePlay
|
||||
println "文件存在" + file(manifestPath).exists()
|
||||
println "" + (isGooglePlay ==1)
|
||||
println "" + (isGooglePlay == 1)
|
||||
println "" + (file(manifestPath).exists() && isGooglePlay == 1)
|
||||
if (file(manifestPath).exists() && isGooglePlay == 1) {
|
||||
def manifestContent = file(manifestPath).getText()
|
||||
@ -134,7 +134,7 @@ android {
|
||||
variant.mergeAssetsProvider.configure {
|
||||
doLast {
|
||||
delete(fileTree(dir: outputDir, includes: ['model/ai_bgseg_green.bundle',
|
||||
'model/ai_face_processor.bundle',
|
||||
//'model/ai_face_processor.bundle',
|
||||
//'model/ai_face_processor_lite.bundle',
|
||||
'model/ai_hairseg.bundle',
|
||||
'model/ai_hand_processor.bundle',
|
||||
@ -161,8 +161,11 @@ android {
|
||||
]))
|
||||
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor_lite.bundle',
|
||||
'graphics/face_beautification.bundle']))
|
||||
delete(fileTree(dir: outputDir, includes: [
|
||||
'model/ai_face_processor_lite.bundle',
|
||||
'model/ai_face_processor.bundle',
|
||||
'graphics/face_beautification.bundle'
|
||||
]))
|
||||
} else {
|
||||
println "不删除bundle"
|
||||
}
|
||||
@ -228,8 +231,8 @@ android {
|
||||
multiDexEnabled true
|
||||
ndk {
|
||||
// TODO: 谷歌商城需要兼容两个平台
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
//abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
//abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
|
||||
}
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
|
@ -289,6 +289,8 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
|
||||
|
||||
#--------ARouter
|
||||
|
||||
-keep public class com.alibaba.android.arouter.**{*;}
|
||||
-keep public class com.alibaba.android.arouter.routes.**{*;}
|
||||
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
||||
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
||||
@ -407,6 +409,8 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class com.shayu.lib_google.**{*;}
|
||||
-keep class com.shayu.lib_huawei.**{*;}
|
||||
|
||||
-keep class io.agora.**{*;}
|
||||
|
||||
-keep class com.qiniu.**{*;}
|
||||
-keep class com.qiniu.**{public <init>();}
|
||||
-ignorewarnings
|
||||
@ -436,6 +440,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class com.google.android.gms.auth.api.signin.RevocationBoundService { <init>(); }
|
||||
-keep class com.google.android.gms.auth.api.signin.internal.SignInHubActivity { <init>(); }
|
||||
-keep class com.google.android.gms.common.api.GoogleApiActivity { <init>(); }
|
||||
-keep class com.google.android.gms.measurement.AppMeasurementJobService { <init>(); }
|
||||
-keep class com.google.android.gms.measurement.AppMeasurementReceiver { <init>(); }
|
||||
-keep class com.google.android.gms.measurement.AppMeasurementService { <init>(); }
|
||||
-keep class com.google.firebase.components.ComponentDiscoveryService { <init>(); }
|
||||
-keep class com.google.firebase.iid.FirebaseInstanceIdReceiver { <init>(); }
|
||||
-keep class com.google.firebase.messaging.FirebaseMessagingService { <init>(); }
|
||||
@ -487,12 +494,14 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class com.yunbao.live.activity.LiveReportActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.LiveRyAnchorActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.LiveShutUpActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.LiveSwAnchorActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.LiveTRTCAnchorActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.MedalQuestionWebViewActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.PDLIiveChatActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.RoomManageActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.RoomManageDetailActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.SudGameActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.SudRyGameActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.SudSwGameActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.SystemMessageActivity { <init>(); }
|
||||
-keep class com.yunbao.live.activity.WebViewActivityMedal { <init>(); }
|
||||
-keep class com.yunbao.live.activity.ZhuangBanActivity { <init>(); }
|
||||
@ -1082,6 +1091,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
|
||||
|
||||
# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\app\build\intermediates\aapt_proguard_file\release\processReleaseResources\aapt_rules.txt
|
||||
# The proguard configuration file for the following section is C:\Users\58381\Documents\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
|
||||
|
||||
# End of content from C:\Users\58381\Documents\AndroidProject\pandorapan\lib_faceunity\build\intermediates\consumer_proguard_dir\release\exportReleaseConsumerProguardFiles\lib0\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\8d3e3177c15403546de73d87508067d6\transformed\jetified-XPopup-2.10.0\proguard.txt
|
||||
# Generated keep rule for Lifecycle observer adapter.
|
||||
-if class com.lxj.xpopup.core.BasePopupView {
|
||||
@ -1687,6 +1699,38 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\af9bdee4e01691bfa29595eaf6011f49\transformed\jetified-play-services-base-18.0.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\53d8ae00710cb6dfde668ad5c2529a5c\transformed\jetified-play-services-measurement-21.1.1\proguard.txt
|
||||
# We keep all fields for every generated proto file as the runtime uses
|
||||
# reflection over them that ProGuard cannot detect. Without this keep
|
||||
# rule, fields may be removed that would cause runtime failures.
|
||||
-keepclassmembers class * extends com.google.android.gms.internal.measurement.zzke {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\53d8ae00710cb6dfde668ad5c2529a5c\transformed\jetified-play-services-measurement-21.1.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\fdcd25b13ca01df0d64e21ab18452962\transformed\jetified-play-services-measurement-api-21.1.1\proguard.txt
|
||||
# Can be removed once we pull in a dependency on firebase-common that includes
|
||||
# https://github.com/firebase/firebase-android-sdk/pull/1472/commits/856f1ca1151cdd88679bbc778892f23dfa34fc06#diff-a2ed34b5a38b4c6c686b09e54865eb48
|
||||
-dontwarn com.google.auto.value.AutoValue
|
||||
-dontwarn com.google.auto.value.AutoValue$Builder
|
||||
|
||||
# We keep all fields for every generated proto file as the runtime uses
|
||||
# reflection over them that ProGuard cannot detect. Without this keep
|
||||
# rule, fields may be removed that would cause runtime failures.
|
||||
-keepclassmembers class * extends com.google.android.gms.internal.measurement.zzke {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\fdcd25b13ca01df0d64e21ab18452962\transformed\jetified-play-services-measurement-api-21.1.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\d9a1fa15000998f069a9eb095ddd5d6c\transformed\jetified-play-services-measurement-sdk-21.1.1\proguard.txt
|
||||
# We keep all fields for every generated proto file as the runtime uses
|
||||
# reflection over them that ProGuard cannot detect. Without this keep
|
||||
# rule, fields may be removed that would cause runtime failures.
|
||||
-keepclassmembers class * extends com.google.android.gms.internal.measurement.zzke {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\d9a1fa15000998f069a9eb095ddd5d6c\transformed\jetified-play-services-measurement-sdk-21.1.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\1b549d0d5a78f93d1b3cd259941d27d6\transformed\jetified-firebase-common-20.1.2\proguard.txt
|
||||
-dontwarn com.google.firebase.platforminfo.KotlinDetector
|
||||
-dontwarn com.google.auto.value.AutoValue
|
||||
@ -1697,6 +1741,33 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\4566a60c961a57d307c42a2fd5514004\transformed\jetified-play-services-tasks-18.0.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\e3d5db4c204c05b688c67157d08d719e\transformed\jetified-play-services-measurement-impl-21.1.1\proguard.txt
|
||||
# We keep all fields for every generated proto file as the runtime uses
|
||||
# reflection over them that ProGuard cannot detect. Without this keep
|
||||
# rule, fields may be removed that would cause runtime failures.
|
||||
-keepclassmembers class * extends com.google.android.gms.internal.measurement.zzke {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\e3d5db4c204c05b688c67157d08d719e\transformed\jetified-play-services-measurement-impl-21.1.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\a14887389ea05f2c3a61b51470f02e11\transformed\jetified-play-services-measurement-sdk-api-21.1.1\proguard.txt
|
||||
# We keep all fields for every generated proto file as the runtime uses
|
||||
# reflection over them that ProGuard cannot detect. Without this keep
|
||||
# rule, fields may be removed that would cause runtime failures.
|
||||
-keepclassmembers class * extends com.google.android.gms.internal.measurement.zzke {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\a14887389ea05f2c3a61b51470f02e11\transformed\jetified-play-services-measurement-sdk-api-21.1.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\a00f92aeac02d4041e8903bda4c31467\transformed\jetified-play-services-measurement-base-21.1.1\proguard.txt
|
||||
# We keep all fields for every generated proto file as the runtime uses
|
||||
# reflection over them that ProGuard cannot detect. Without this keep
|
||||
# rule, fields may be removed that would cause runtime failures.
|
||||
-keepclassmembers class * extends com.google.android.gms.internal.measurement.zzke {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\a00f92aeac02d4041e8903bda4c31467\transformed\jetified-play-services-measurement-base-21.1.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\98374b479c7a7c4245d90ea630585909\transformed\jetified-play-services-basement-18.1.0\proguard.txt
|
||||
# Needed when building against pre-Marshmallow SDK.
|
||||
-dontwarn android.security.NetworkSecurityPolicy
|
||||
@ -2248,7 +2319,7 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\9bc6fb118e278279304d710763b86c85\transformed\jetified-SudASR-1.3.3.1158\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\3d3f072f1af512d0e751a2c7c5e8b8ec\transformed\jetified-core-8.3.1\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\d5594233d50b1d727f4630790ca89a13\transformed\jetified-core-8.7.0\proguard.txt
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
@ -2275,7 +2346,7 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
-keep class com.faceunity.wrapper.faceunity {*;}
|
||||
-keep class com.faceunity.wrapper.faceunity$RotatedImage {*;}
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\3d3f072f1af512d0e751a2c7c5e8b8ec\transformed\jetified-core-8.3.1\proguard.txt
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\d5594233d50b1d727f4630790ca89a13\transformed\jetified-core-8.7.0\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\526e7910eaa433763f36b642f34c1fee\transformed\jetified-exoplayer-core-2.18.2\proguard.txt
|
||||
# Proguard rules specific to the core module.
|
||||
|
||||
@ -2686,6 +2757,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
||||
|
||||
-keepnames class com.android.billingclient.api.ProxyBillingActivity
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\a358ff6705c32d8c6337aefd4316f1b9\transformed\jetified-billing-5.0.0\proguard.txt
|
||||
# The proguard configuration file for the following section is C:\gradle-6.1.1\caches\transforms-3\eb4fdf1a1abe4d45e8a1ea6c65e9f330\transformed\jetified-model-8.7.0\proguard.txt
|
||||
|
||||
# End of content from C:\gradle-6.1.1\caches\transforms-3\eb4fdf1a1abe4d45e8a1ea6c65e9f330\transformed\jetified-model-8.7.0\proguard.txt
|
||||
# The proguard configuration file for the following section is <unknown>
|
||||
|
||||
# End of content from <unknown>
|
@ -19,6 +19,9 @@ import com.yunbao.common.utils.StringUtil;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.rong.imkit.userinfo.RongUserInfoManager;
|
||||
import io.rong.imlib.model.UserInfo;
|
||||
|
||||
/**
|
||||
* 新手指导员备注列表
|
||||
*/
|
||||
@ -66,6 +69,13 @@ public class InstructorRemarkManager extends BaseCacheManager {
|
||||
this.instructorRemarkMap = JSON.parseObject(map, new TypeReference<Map<String, String>>() {
|
||||
});
|
||||
put(KEY_INSTRUCTOR_REMARK, map);
|
||||
for (String key : instructorRemarkMap.keySet()) {
|
||||
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(key);
|
||||
if(userInfo!=null){
|
||||
userInfo.setName(instructorRemarkMap.get(key));
|
||||
RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@ package com.yunbao.common.utils;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@ -218,6 +219,18 @@ public class GoogleUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public void logEvent(String key, Bundle bundle) {
|
||||
try {
|
||||
Context ctn = mActivity == null ? mContext : mActivity;
|
||||
Class<?> clz = ctn.getClassLoader().loadClass("com.shayu.lib_google.utils.FirebaseManage");
|
||||
Object object = clz.getConstructor(Context.class).newInstance(ctn);
|
||||
object.getClass().getMethod("logEvent", String.class, Bundle.class)
|
||||
.invoke(object, key, bundle);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void queryPurchasesAsync() {
|
||||
try {
|
||||
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage");
|
||||
@ -232,7 +245,7 @@ public class GoogleUtils {
|
||||
|
||||
try {
|
||||
Class<?> clz = mContext.getClassLoader().loadClass("com.shayu.lib_google.utils.FirebaseManage");
|
||||
googlePay= clz.getConstructor(Context.class).newInstance(mContext);
|
||||
googlePay = clz.getConstructor(Context.class).newInstance(mContext);
|
||||
googlePay.getClass()
|
||||
.getMethod("setFirebaseCrashData", String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class)
|
||||
.invoke(googlePay, uid, userData, isGoogle, cpu, runTime, enterRoom, slidingRoom, playSvga, ActivitySize);
|
||||
|
@ -17,7 +17,7 @@ ext {
|
||||
|
||||
//百度语音识别
|
||||
|
||||
swReleaseModel : false, //true声网正式服 false测试服
|
||||
swReleaseModel : false, //true 声网正式服 false 测试服
|
||||
|
||||
baiduAppId : "23774720",
|
||||
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
|
||||
@ -31,6 +31,6 @@ ext {
|
||||
//是否上报异常日志
|
||||
isUploadLog : true,
|
||||
//是否打包成插件包模式
|
||||
isPluginModel : true,
|
||||
isPluginModel : false,
|
||||
]
|
||||
}
|
||||
|
@ -148,6 +148,7 @@ class FaceUnityBeautyAPIImpl : FaceUnityBeautyAPI, IVideoFrameObserver {
|
||||
enableChange = true
|
||||
LogUtils.i(TAG, "enable >> enableChange")
|
||||
}
|
||||
config?.fuRenderKit?.setUseTexAsync(true)
|
||||
return ErrorCode.ERROR_OK.value
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,7 @@ dependencies {
|
||||
|
||||
implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
api 'com.google.firebase:firebase-analytics:21.1.0'
|
||||
|
||||
//implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
||||
//implementation 'com.google.firebase:firebase-crashlytics'
|
||||
|
@ -3,6 +3,7 @@ package com.shayu.lib_google.utils;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -35,6 +36,14 @@ public class FirebaseManage {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void logEvent(String key, Bundle bundle) {
|
||||
//mFirebaseAnalytics
|
||||
Context ctn = mActivity == null ? mContext : mActivity;
|
||||
com.google.firebase.analytics.FirebaseAnalytics.getInstance(ctn).logEvent(
|
||||
key, bundle
|
||||
);
|
||||
}
|
||||
|
||||
public void initToken() {
|
||||
FirebaseMessaging.getInstance().getToken().addOnCompleteListener(new OnCompleteListener<String>() {
|
||||
@Override
|
||||
|
@ -1226,46 +1226,46 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
if (obj != null) {
|
||||
if (obj.getString("ispk").equals("0")) {
|
||||
final SocketSendBean msg1 = new SocketSendBean()
|
||||
.param("_method_", SOCKET_LINK_MIC_PK)
|
||||
.param("action", 1)
|
||||
.param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName())
|
||||
.param("pkuid", pkUid)
|
||||
.param("uid", CommonAppConfig.getInstance().getUid())
|
||||
.param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar())
|
||||
.param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar())
|
||||
.param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName());
|
||||
//判断是否是随机PK
|
||||
if(extra){
|
||||
msg1.param("random_pk", "1");
|
||||
msg1.param("msgtype","11");
|
||||
if (RandomPkManager.getInstance().isRankModel()) {
|
||||
msg1.param("is_ladders", "https://downs.yaoulive.com/rank_top_box.png");
|
||||
}
|
||||
final SocketSendBean msg1 = new SocketSendBean()
|
||||
.param("_method_", SOCKET_LINK_MIC_PK)
|
||||
.param("action", 1)
|
||||
.param("uname", CommonAppConfig.getInstance().getUserBean().getUserNiceName())
|
||||
.param("pkuid", pkUid)
|
||||
.param("uid", CommonAppConfig.getInstance().getUid())
|
||||
.param("pkhead", CommonAppConfig.getInstance().getUserBean().getAvatar())
|
||||
.param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar())
|
||||
.param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName());
|
||||
//判断是否是随机PK
|
||||
if(extra){
|
||||
msg1.param("random_pk", "1");
|
||||
msg1.param("msgtype","11");
|
||||
if (RandomPkManager.getInstance().isRankModel()) {
|
||||
msg1.param("is_ladders", "https://downs.yaoulive.com/rank_top_box.png");
|
||||
}
|
||||
msg1.create();
|
||||
}
|
||||
msg1.create();
|
||||
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain("g" + pkUid, conversationType, messageContent);
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.CHATROOM;
|
||||
TextMessage messageContent = TextMessage.obtain(msg1.mResult.toString());
|
||||
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain("g" + pkUid, conversationType, messageContent);
|
||||
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(io.rong.imlib.model.Message message) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(io.rong.imlib.model.Message message) {
|
||||
Log.e("tx", "发送成功");
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(io.rong.imlib.model.Message message) {
|
||||
Log.e("tx", "发送成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(io.rong.imlib.model.Message message, RongIMClient.ErrorCode errorCode) {
|
||||
Log.e("tx", "发送失败" + errorCode.getMessage());
|
||||
@Override
|
||||
public void onError(io.rong.imlib.model.Message message, RongIMClient.ErrorCode errorCode) {
|
||||
Log.e("tx", "发送失败" + errorCode.getMessage());
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(mContext.getString(R.string.pking_over));
|
||||
if (RandomPkManager.getInstance().isRandomModel()) {
|
||||
|
@ -29,9 +29,11 @@ import com.yunbao.live.event.InputPanelViewHolderEvent;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.common.RLog;
|
||||
import io.rong.imkit.R.string;
|
||||
@ -41,7 +43,11 @@ import io.rong.imkit.utils.language.LangUtils;
|
||||
import io.rong.imkit.utils.language.RongConfigurationManager;
|
||||
import io.rong.imkit.widget.adapter.IViewProviderListener;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
import io.rong.imlib.IRongCoreCallback;
|
||||
import io.rong.imlib.IRongCoreEnum;
|
||||
import io.rong.imlib.RongCoreClient;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.imlib.model.Message;
|
||||
import io.rong.imlib.model.MessageContent;
|
||||
|
||||
@ -64,6 +70,43 @@ public class PDLiveMessageListAdapter extends MessageListAdapter {
|
||||
super(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataCollection(List<UiMessage> data) {
|
||||
List<UiMessage> list = new ArrayList<>();
|
||||
for (UiMessage datum : data) {
|
||||
try {
|
||||
String content = datum.getMessage().getContent().toString();
|
||||
if (content.contains("retcode") && content.contains("_method_")) {
|
||||
delMessage(datum.getTargetId(), datum.getMessage());
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
list.add(datum);
|
||||
}
|
||||
super.setDataCollection(list);
|
||||
}
|
||||
|
||||
private void delMessage(String targetId, Message msg) {
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
|
||||
Message[] messages = {msg};
|
||||
RongCoreClient.getInstance().deleteRemoteMessages(conversationType, targetId, messages, new IRongCoreCallback.OperationCallback() {
|
||||
/**
|
||||
* 删除消息成功回调
|
||||
*/
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
super.onBindViewHolder(holder, position);
|
||||
|
@ -239,7 +239,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// DebugDialog.getInstance(mContext).setParams("测试版本","1.00");
|
||||
// DebugDialog.getInstance(mContext).setParams("测试版本","1.00");
|
||||
ConversationIMListManager.get(mContext).addUserInfoProvider();
|
||||
MessageIMManager.get(mContext).resetImUnReadMessageCount(mContext);
|
||||
}
|
||||
@ -295,8 +295,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw);
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -517,8 +517,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw);
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -596,6 +596,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
@Override
|
||||
public void onSuccess(FirstLoginBean data) {
|
||||
if (data.getStatus() == 0) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("uid", IMLoginManager.get(mContext).getUserInfo().getId() + "");
|
||||
GoogleUtils.newInstance(mContext).logEvent("sign_up",bundle);
|
||||
mContext.startActivity(new Intent(mContext, CompleteUserInfoActivity.class));
|
||||
}
|
||||
}
|
||||
@ -1160,9 +1163,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
public void watchLive(LiveBean liveBean, String key, int position) {
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk,boolean isSw) {
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk, boolean isSw) {
|
||||
MobclickAgent.onEvent(mContext, "home_page_enter_room", "首页点击直播间");
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw);
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1502,11 +1505,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void userSignOut(RongIMConnectionStatusEvent model) {
|
||||
if(model.getStatus()==-1) {
|
||||
if (model.getStatus() == -1) {
|
||||
IMLoginManager.get(mContext).logout(this);
|
||||
CommonAppConfig.getInstance().clearLoginInfo();
|
||||
LoginActivity.forward();
|
||||
}else if(model.getStatus()==1){
|
||||
} else if (model.getStatus() == 1) {
|
||||
ConversationIMListManager.get(mContext).addUserInfoProvider();
|
||||
}
|
||||
}
|
||||
@ -1600,7 +1603,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveFloatEvent(LiveFloatEvent event) {
|
||||
if (event != null && event.getmLiveBean() != null && !TextUtils.isEmpty(event.getmLiveBean().getPull())) {
|
||||
new Handler().post(() -> LiveFloatView.getInstance().cacheLiveData(event.getmLiveBean(), event.getmLiveType(), event.getmLiveSDK() ==Constants.LIVE_SDK_SW, event.getmLiveTypeVal()).builderFloat(mContext, event.getmLiveBean().getPull(), LiveAudienceActivity.class));
|
||||
new Handler().post(() -> LiveFloatView.getInstance().cacheLiveData(event.getmLiveBean(), event.getmLiveType(), event.getmLiveSDK() == Constants.LIVE_SDK_SW, event.getmLiveTypeVal()).builderFloat(mContext, event.getmLiveBean().getPull(), LiveAudienceActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1613,9 +1616,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
floatWarOrder.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}*/
|
||||
if(floatWarOrder.getTag()!=null){
|
||||
if (floatWarOrder.getTag() != null) {
|
||||
floatWarOrder.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
} else {
|
||||
floatWarOrder.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
|
||||
import com.yunbao.common.manager.InstructorRemarkManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
@ -57,6 +58,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
|
||||
conversationListFragment.getAdapter().setOnRefreshListener(new OnRecyclerListRefreshListener<List<BaseUiConversation>>() {
|
||||
@Override
|
||||
public void onFinish(List<BaseUiConversation> baseUiConversations) {
|
||||
InstructorRemarkManager.get(mContext).getNetInstructorRemark();
|
||||
loadLiveLookTime(baseUiConversations, new OnRecyclerListRefreshListener<Map<String, Integer>>() {
|
||||
@Override
|
||||
public void onFinish(Map<String, Integer> stringIntegerMap) {
|
||||
|
Loading…
Reference in New Issue
Block a user