新增新用户注册后FirebaseAnalytics.logEvent调用

尝试修复美颜会闪屏问题(待观察)
修复跨机子设置备注不显示在列表上的问题
修复聊天列表会出现PK消息的问题
This commit is contained in:
zlzw 2024-06-06 15:30:17 +08:00
parent 405909f3b3
commit 4628079ac7
12 changed files with 217 additions and 58 deletions

View File

@ -120,7 +120,7 @@ android {
def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay def isGooglePlay = rootProject.ext.manifestPlaceholders.isGooglePlay
println "谷歌版本:" + isGooglePlay println "谷歌版本:" + isGooglePlay
println "文件存在" + file(manifestPath).exists() println "文件存在" + file(manifestPath).exists()
println "" + (isGooglePlay ==1) println "" + (isGooglePlay == 1)
println "" + (file(manifestPath).exists() && isGooglePlay == 1) println "" + (file(manifestPath).exists() && isGooglePlay == 1)
if (file(manifestPath).exists() && isGooglePlay == 1) { if (file(manifestPath).exists() && isGooglePlay == 1) {
def manifestContent = file(manifestPath).getText() def manifestContent = file(manifestPath).getText()
@ -134,7 +134,7 @@ android {
variant.mergeAssetsProvider.configure { variant.mergeAssetsProvider.configure {
doLast { doLast {
delete(fileTree(dir: outputDir, includes: ['model/ai_bgseg_green.bundle', 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_face_processor_lite.bundle',
'model/ai_hairseg.bundle', 'model/ai_hairseg.bundle',
'model/ai_hand_processor.bundle', 'model/ai_hand_processor.bundle',
@ -161,8 +161,11 @@ android {
])) ]))
println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel println "isPluginModel = " + rootProject.ext.manifestPlaceholders.isPluginModel
if (rootProject.ext.manifestPlaceholders.isPluginModel) { if (rootProject.ext.manifestPlaceholders.isPluginModel) {
delete(fileTree(dir: outputDir, includes: ['model/ai_face_processor_lite.bundle', delete(fileTree(dir: outputDir, includes: [
'graphics/face_beautification.bundle'])) 'model/ai_face_processor_lite.bundle',
'model/ai_face_processor.bundle',
'graphics/face_beautification.bundle'
]))
} else { } else {
println "不删除bundle" println "不删除bundle"
} }
@ -228,8 +231,8 @@ android {
multiDexEnabled true multiDexEnabled true
ndk { ndk {
// TODO: // TODO:
abiFilters "armeabi-v7a", "arm64-v8a" //abiFilters "armeabi-v7a", "arm64-v8a"
//abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64" abiFilters "armeabi-v7a", "arm64-v8a","x86","x86_64"
} }
javaCompileOptions { javaCompileOptions {
annotationProcessorOptions { annotationProcessorOptions {

View File

@ -289,6 +289,8 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-keep class org.greenrobot.eventbus.android.AndroidComponentsImpl* -keep class org.greenrobot.eventbus.android.AndroidComponentsImpl*
#--------ARouter #--------ARouter
-keep public class com.alibaba.android.arouter.**{*;}
-keep public class com.alibaba.android.arouter.routes.**{*;} -keep public class com.alibaba.android.arouter.routes.**{*;}
-keep public class com.alibaba.android.arouter.facade.**{*;} -keep public class com.alibaba.android.arouter.facade.**{*;}
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;} -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_google.**{*;}
-keep class com.shayu.lib_huawei.**{*;} -keep class com.shayu.lib_huawei.**{*;}
-keep class io.agora.**{*;}
-keep class com.qiniu.**{*;} -keep class com.qiniu.**{*;}
-keep class com.qiniu.**{public <init>();} -keep class com.qiniu.**{public <init>();}
-ignorewarnings -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.RevocationBoundService { <init>(); }
-keep class com.google.android.gms.auth.api.signin.internal.SignInHubActivity { <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.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.components.ComponentDiscoveryService { <init>(); }
-keep class com.google.firebase.iid.FirebaseInstanceIdReceiver { <init>(); } -keep class com.google.firebase.iid.FirebaseInstanceIdReceiver { <init>(); }
-keep class com.google.firebase.messaging.FirebaseMessagingService { <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.LiveReportActivity { <init>(); }
-keep class com.yunbao.live.activity.LiveRyAnchorActivity { <init>(); } -keep class com.yunbao.live.activity.LiveRyAnchorActivity { <init>(); }
-keep class com.yunbao.live.activity.LiveShutUpActivity { <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.LiveTRTCAnchorActivity { <init>(); }
-keep class com.yunbao.live.activity.MedalQuestionWebViewActivity { <init>(); } -keep class com.yunbao.live.activity.MedalQuestionWebViewActivity { <init>(); }
-keep class com.yunbao.live.activity.PDLIiveChatActivity { <init>(); } -keep class com.yunbao.live.activity.PDLIiveChatActivity { <init>(); }
-keep class com.yunbao.live.activity.RoomManageActivity { <init>(); } -keep class com.yunbao.live.activity.RoomManageActivity { <init>(); }
-keep class com.yunbao.live.activity.RoomManageDetailActivity { <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.SystemMessageActivity { <init>(); }
-keep class com.yunbao.live.activity.WebViewActivityMedal { <init>(); } -keep class com.yunbao.live.activity.WebViewActivityMedal { <init>(); }
-keep class com.yunbao.live.activity.ZhuangBanActivity { <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 # 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 # 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. # Generated keep rule for Lifecycle observer adapter.
-if class com.lxj.xpopup.core.BasePopupView { -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 # 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 # 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.firebase.platforminfo.KotlinDetector
-dontwarn com.google.auto.value.AutoValue -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 # 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 # 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. # Needed when building against pre-Marshmallow SDK.
-dontwarn android.security.NetworkSecurityPolicy -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 # 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. # Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the # You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle. # 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 {*;}
-keep class com.faceunity.wrapper.faceunity$RotatedImage {*;} -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 # 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. # Proguard rules specific to the core module.
@ -2686,6 +2757,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
-keepnames class com.android.billingclient.api.ProxyBillingActivity -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 # 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> # The proguard configuration file for the following section is <unknown>
# End of content from <unknown> # End of content from <unknown>

View File

@ -19,6 +19,9 @@ import com.yunbao.common.utils.StringUtil;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; 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>>() { this.instructorRemarkMap = JSON.parseObject(map, new TypeReference<Map<String, String>>() {
}); });
put(KEY_INSTRUCTOR_REMARK, map); 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);
}
}
} }
/** /**

View File

@ -3,6 +3,7 @@ package com.yunbao.common.utils;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle;
import com.alibaba.fastjson.JSON; 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() { public void queryPurchasesAsync() {
try { try {
Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage"); Class<?> clz = mActivity.getClassLoader().loadClass("com.shayu.lib_google.utils.GoogleBillingManage");
@ -232,7 +245,7 @@ public class GoogleUtils {
try { try {
Class<?> clz = mContext.getClassLoader().loadClass("com.shayu.lib_google.utils.FirebaseManage"); 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() googlePay.getClass()
.getMethod("setFirebaseCrashData", String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class, String.class) .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); .invoke(googlePay, uid, userData, isGoogle, cpu, runTime, enterRoom, slidingRoom, playSvga, ActivitySize);

View File

@ -17,7 +17,7 @@ ext {
// //
swReleaseModel : false, //true声网正式服 false测试 swReleaseModel : false, //true false
baiduAppId : "23774720", baiduAppId : "23774720",
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB", baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
@ -31,6 +31,6 @@ ext {
// //
isUploadLog : true, isUploadLog : true,
// //
isPluginModel : true, isPluginModel : false,
] ]
} }

View File

@ -148,6 +148,7 @@ class FaceUnityBeautyAPIImpl : FaceUnityBeautyAPI, IVideoFrameObserver {
enableChange = true enableChange = true
LogUtils.i(TAG, "enable >> enableChange") LogUtils.i(TAG, "enable >> enableChange")
} }
config?.fuRenderKit?.setUseTexAsync(true)
return ErrorCode.ERROR_OK.value return ErrorCode.ERROR_OK.value
} }

View File

@ -38,6 +38,7 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:30.5.0') implementation platform('com.google.firebase:firebase-bom:30.5.0')
implementation 'com.google.firebase:firebase-crashlytics' 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 platform('com.google.firebase:firebase-bom:30.5.0')
//implementation 'com.google.firebase:firebase-crashlytics' //implementation 'com.google.firebase:firebase-crashlytics'

View File

@ -3,6 +3,7 @@ package com.shayu.lib_google.utils;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.os.Build; import android.os.Build;
import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
@ -35,6 +36,14 @@ public class FirebaseManage {
return token; 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() { public void initToken() {
FirebaseMessaging.getInstance().getToken().addOnCompleteListener(new OnCompleteListener<String>() { FirebaseMessaging.getInstance().getToken().addOnCompleteListener(new OnCompleteListener<String>() {
@Override @Override

View File

@ -29,9 +29,11 @@ import com.yunbao.live.event.InputPanelViewHolderEvent;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import io.rong.common.RLog; import io.rong.common.RLog;
import io.rong.imkit.R.string; 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.utils.language.RongConfigurationManager;
import io.rong.imkit.widget.adapter.IViewProviderListener; import io.rong.imkit.widget.adapter.IViewProviderListener;
import io.rong.imkit.widget.adapter.ViewHolder; 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.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message; import io.rong.imlib.model.Message;
import io.rong.imlib.model.MessageContent; import io.rong.imlib.model.MessageContent;
@ -64,6 +70,43 @@ public class PDLiveMessageListAdapter extends MessageListAdapter {
super(listener); 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 @Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) { public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
super.onBindViewHolder(holder, position); super.onBindViewHolder(holder, position);

View File

@ -295,8 +295,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override @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) {
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw); RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
} }
@Override @Override
@ -517,8 +517,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override @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) {
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal),isSw); RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal), isSw);
} }
@Override @Override
@ -596,6 +596,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override @Override
public void onSuccess(FirstLoginBean data) { public void onSuccess(FirstLoginBean data) {
if (data.getStatus() == 0) { 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)); 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) { public void watchLive(LiveBean liveBean, String key, int position) {
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() { new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
@Override @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", "首页点击直播间"); 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 @Override
@ -1502,11 +1505,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
*/ */
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void userSignOut(RongIMConnectionStatusEvent model) { public void userSignOut(RongIMConnectionStatusEvent model) {
if(model.getStatus()==-1) { if (model.getStatus() == -1) {
IMLoginManager.get(mContext).logout(this); IMLoginManager.get(mContext).logout(this);
CommonAppConfig.getInstance().clearLoginInfo(); CommonAppConfig.getInstance().clearLoginInfo();
LoginActivity.forward(); LoginActivity.forward();
}else if(model.getStatus()==1){ } else if (model.getStatus() == 1) {
ConversationIMListManager.get(mContext).addUserInfoProvider(); ConversationIMListManager.get(mContext).addUserInfoProvider();
} }
} }
@ -1600,7 +1603,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onLiveFloatEvent(LiveFloatEvent event) { public void onLiveFloatEvent(LiveFloatEvent event) {
if (event != null && event.getmLiveBean() != null && !TextUtils.isEmpty(event.getmLiveBean().getPull())) { 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); floatWarOrder.setVisibility(View.VISIBLE);
} }
}*/ }*/
if(floatWarOrder.getTag()!=null){ if (floatWarOrder.getTag() != null) {
floatWarOrder.setVisibility(View.VISIBLE); floatWarOrder.setVisibility(View.VISIBLE);
}else{ } else {
floatWarOrder.setVisibility(View.GONE); floatWarOrder.setVisibility(View.GONE);
} }
} }

View File

@ -15,6 +15,7 @@ import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import com.yunbao.common.interfaces.OnRecyclerListRefreshListener; import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
import com.yunbao.common.manager.InstructorRemarkManager;
import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R; import com.yunbao.live.R;
@ -57,6 +58,7 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment
conversationListFragment.getAdapter().setOnRefreshListener(new OnRecyclerListRefreshListener<List<BaseUiConversation>>() { conversationListFragment.getAdapter().setOnRefreshListener(new OnRecyclerListRefreshListener<List<BaseUiConversation>>() {
@Override @Override
public void onFinish(List<BaseUiConversation> baseUiConversations) { public void onFinish(List<BaseUiConversation> baseUiConversations) {
InstructorRemarkManager.get(mContext).getNetInstructorRemark();
loadLiveLookTime(baseUiConversations, new OnRecyclerListRefreshListener<Map<String, Integer>>() { loadLiveLookTime(baseUiConversations, new OnRecyclerListRefreshListener<Map<String, Integer>>() {
@Override @Override
public void onFinish(Map<String, Integer> stringIntegerMap) { public void onFinish(Map<String, Integer> stringIntegerMap) {