Compare commits

...

113 Commits

Author SHA1 Message Date
Max
7291b61e44 fix:临时方案修复WEB弹窗因导航栏导致的显示被裁剪问题 2023-11-21 19:36:30 +08:00
Max
034185d13b Merge branch 'habu_3.3.1/optimize' into habu_3.3.1/test 2023-11-21 11:08:56 +08:00
Max
39a9e277bd fix:修复房间轮博索引不一致问题 2023-11-21 11:08:46 +08:00
Max
b11b6928c5 Merge branch 'habu_3.3.1/isolate' into habu_3.3.1/test 2023-11-20 20:03:29 +08:00
Max
41c00cadcd fix:【MainActivity】自动登录逻辑调整:去掉每次获取ticket的动作(接口并发大概率造成401现象);和后台沟通:现阶段不需要每次刷新即可 2023-11-20 20:03:21 +08:00
Max
4cbc12487b Merge branch 'habu_3.3.1/isolate' into habu_3.3.1/test 2023-11-20 18:32:19 +08:00
Max
345cf1a112 feat:删除绑定授权码相关业务代码 2023-11-20 18:32:11 +08:00
Max
7cb27f61b1 Merge branch 'habu_3.3.1/isolate' into habu_3.3.1/test 2023-11-20 16:38:28 +08:00
Max
865dbb09b6 fix:401处理策略调整(仅发送事件会有意外的bug,改用清除本地登录信息+事件) 2023-11-20 16:33:12 +08:00
Max
a38190e2f9 Merge branch 'habu_3.3.1/isolate' into habu_3.3.1/test 2023-11-20 11:08:55 +08:00
Max
ef5e0a8f59 feat:大陆隔离改用单独接口方式请求 2023-11-20 11:08:47 +08:00
Max
774965a2ec merge:优化合并到test 2023-11-20 10:14:49 +08:00
Max
0d488877c8 feat:取消Tab为1时的自动隐藏逻辑 2023-11-20 10:10:29 +08:00
Max
b647785244 feat:完成房间Banner展示需求 2023-11-17 20:15:26 +08:00
Max
9063aee884 feat:追加对401的处理 2023-11-17 18:05:54 +08:00
Max
a3f2f1324c feat:新增banner-Tab展示图片地址 2023-11-17 17:39:35 +08:00
Max
fe3347fd00 feat:ticket为空的判断移到参数拦截器中(怕影响其他原有业务) 2023-11-17 17:39:01 +08:00
Max
e97f5b3953 fix:修复添加空值请求头导致的异常(pub_ticket) 2023-11-17 17:18:19 +08:00
Max
72f12588c0 feat:完成大陆隔离需求(请求信息添加:运营商、本机语言) 2023-11-17 16:46:55 +08:00
Max
995278f44f feat:完善房间Banner展示弹窗逻辑 2023-11-17 15:34:56 +08:00
Max
382eeb3a89 feat:初步搭建房间banner-Web展示页面 2023-11-17 14:07:20 +08:00
Max
9462b4a1be Merge branch 'habu_3.3.1/optimize' into habu_3.3.1/test
# Conflicts:
#	app/src/main/java/com/yizhuan/habu/ui/setting/SettingActivity.kt
2023-11-17 10:46:35 +08:00
Max
cfdb30b1d5 feat:删除测试代码 2023-11-17 10:45:58 +08:00
Max
b598d6d3a6 feat:完成加入公会优化 2023-11-16 18:50:32 +08:00
Max
ab08a85a2a feat:增加几个测试入口给H5 2023-11-16 18:24:48 +08:00
Max
2b79b7ae6a feat:配置测试入口给王龙 2023-11-16 18:07:41 +08:00
Max
7e05a6514f feat:完成飘窗延时功能 2023-11-16 17:58:49 +08:00
Max
ee28779a01 feat:测试环境域名暂且还有peko的 2023-11-16 15:12:14 +08:00
Max
71dab1bb8f feat:隐藏首页榜单、房间榜单、双收益明细入口 2023-11-16 00:20:21 +08:00
Max
1fd9f386d8 feat:修改注销协议H5地址 2023-11-15 23:43:09 +08:00
Max
c334100bae feat:调整部分H5路径 2023-11-15 23:27:10 +08:00
Max
99844fc6eb feat:修改H5路径 2023-11-15 23:08:51 +08:00
Max
cedc402455 feat:修复错误改动 2023-11-15 22:03:21 +08:00
Max
1d4f1492f9 feat:换loading
feat:隐藏首页顶部入口
2023-11-15 21:50:59 +08:00
Max
5b76455f20 feat:所有PNG转换为WEBP 2023-11-15 19:32:40 +08:00
Max
b57eb8b9f4 feat:补充删除 2023-11-15 19:26:29 +08:00
Max
cb6ca8049f feat:补充删除部分代码 2023-11-15 19:24:56 +08:00
Max
8157edc05c feat:去掉facebook-SDK 2023-11-15 19:21:09 +08:00
Max
c474cd5824 feat:修改部分目录名 2023-11-15 18:51:22 +08:00
Max
7560110af2 feat:【Habu】隐藏分享、游戏房入口 2023-11-15 18:21:54 +08:00
Max
9d63a90942 feat:【Habu Live】替换logo、包名、第三方KEY 2023-11-15 18:14:27 +08:00
Max
bdcfb21e6e Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix 2023-11-01 18:34:23 +08:00
Max
5c7d2e9645 fix:调整幸运礼物动画播放条件(去掉价值520的条件,恢复luckyGiftSvgaUrl逻辑) 2023-11-01 18:34:15 +08:00
Max
d2f24c4457 Merge branch 'v2.2.0/test' into v2.2.0/test_old_fix 2023-11-01 16:29:11 +08:00
Max
7ec11e0aba Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-11-01 16:28:58 +08:00
Max
f4a9690c1b fix:修复红包组件内的compositeDisposable导致再次激活无法执行任务 2023-11-01 16:20:43 +08:00
Max
0742894540 Merge branch 'v2.2.0/test' into v2.2.0/test_old_fix 2023-11-01 14:59:16 +08:00
Max
d0fe8e892e Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-11-01 14:59:05 +08:00
Max
b9120dca54 feat:调整红包打开按钮动画时长
feat:调整红包入口图标
2023-11-01 14:58:47 +08:00
Max
8ebaddad07 Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix 2023-11-01 11:34:52 +08:00
Max
b63b4ba07a fix:修复幸运礼物重复动效(去掉本地自己播的一个svga) 2023-11-01 11:34:43 +08:00
Max
a211267517 fix:修复麦位魅力值展示问题(主麦) 2023-11-01 11:22:04 +08:00
Max
d0e88440e3 Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix 2023-10-31 19:19:32 +08:00
Max
260ed56c99 Merge branch 'v2.2.0/test' into v2.2.0/test_old_fix 2023-10-31 19:19:22 +08:00
Max
505917b70f Merge branch 'v2.2.0/float_gift' into v2.2.0/test 2023-10-31 19:19:05 +08:00
Max
03d013fcba fix:修复合并导致的礼物飘窗未展示房间名称问题 2023-10-31 19:18:57 +08:00
Max
19301bbd84 fix:修复公屏相册条目的等级icon加载模糊问题 2023-10-31 19:07:08 +08:00
Max
694a73931b Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix 2023-10-31 18:06:49 +08:00
Max
d34929d7c7 fix:修复礼物信令解析时未判空导致的解析中断 2023-10-31 18:06:40 +08:00
Max
73eccecfc9 Merge branch 'v2.2.0/test' into v2.2.0/test_old_fix 2023-10-31 17:26:18 +08:00
Max
eb1546570a Merge branch 'v2.2.0/float_gift' into v2.2.0/test
# Conflicts:
#	app/src/main/res/layout/dialog_gift_all_service_level2.xml
2023-10-31 17:26:06 +08:00
Max
7ba43a51d4 fix:调整礼物飘窗弹窗-去围观位置 2023-10-31 17:25:22 +08:00
Max
bae4660840 Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-10-31 17:19:15 +08:00
Max
b9fd24e0ff fix:红包过期时间动态展示(发布、小秘书)
fix:调整全服红包文案字数限制
2023-10-31 17:19:06 +08:00
Max
4bef25e1e3 Merge branch 'v2.2.0/test' into v2.2.0/test_old_fix 2023-10-31 15:54:47 +08:00
Max
72480daa98 Merge branch 'v2.2.0/float_gift' into v2.2.0/test 2023-10-31 15:54:35 +08:00
Max
1defcb0d28 fix:修复礼物飘窗与其他特效飘窗重叠问题(加顶部间距:之前版本是这么解决的,应该是之前版本没做完善这块需求) 2023-10-31 15:54:26 +08:00
Max
4885a0bdbd Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix 2023-10-31 15:14:14 +08:00
Max
5900702ca6 fix:修复公屏历史消息未查询相册类型消息问题 2023-10-31 15:14:04 +08:00
Max
9e6928580f Merge branch 'v2.1.1/fix' into v2.2.0/test_old_fix 2023-10-31 11:25:46 +08:00
Max
e644ced1ed fix:去除聊天页-语音&图片时的WRITE_EXTERNAL_STORAGE权限 2023-10-31 11:25:16 +08:00
Max
1667dd3863 Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-10-31 11:11:59 +08:00
Max
c04d3e283b fix:点击红包图标 已领取且领取完时 增加提示并更新入口 2023-10-31 11:10:51 +08:00
Max
2b6d66c31e Merge branch 'v2.2.0/float_gift' into v2.2.0/test 2023-10-31 10:19:48 +08:00
Max
e56bbb5f8f fix:修复非房间礼物 飘窗弹窗 点击跳转未屏蔽问题 2023-10-31 10:17:09 +08:00
Max
7bf7e232d0 Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-10-30 20:11:15 +08:00
Max
d63a441296 feat:去掉房间设置中的-全服红包开关(暂时操作隐藏入口) 2023-10-30 20:08:08 +08:00
Max
e81ec19168 Merge branch 'v2.2.0/float_gift' into v2.2.0/test
# Conflicts:
#	gradle.properties
2023-10-30 20:02:52 +08:00
Max
588b96ec7b fix:跳转提示去房间的忽略提示规则 2023-10-30 20:02:04 +08:00
Max
514abbc314 Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-10-30 19:49:16 +08:00
Max
94d9183952 fix:修复全服红包未展示自定义文案问题 2023-10-30 19:49:09 +08:00
Max
6eedd5cc46 fix:修复切换同类型房间导致的Widget未更新Context问题 2023-10-30 19:30:26 +08:00
Max
087091275f fix:增加领取成功后主动刷新入口图标数据 2023-10-30 17:10:20 +08:00
Max
f54a8ec175 feat:完善发送红包的权限细分
feat:删除红包无用旧代码
2023-10-30 16:49:00 +08:00
Max
fee8f2ceb9 Merge branch 'v2.2.0/red_package' into v2.2.0/test
# Conflicts:
#	app/src/main/res/values/strings.xml
2023-10-30 15:37:59 +08:00
Max
a18a66b496 fix;修复红包失效时的入口更新问题 2023-10-30 15:36:00 +08:00
Max
80e21bee74 fix:修复房间内点击红包跳转到其他房间后没弹出红包问题 2023-10-30 15:16:06 +08:00
Max
e031dd9d02 fix:修复红包内若干bug 2023-10-30 14:45:19 +08:00
Max
19a3b64a32 Merge branch 'v2.2.0/float_gift' into v2.2.0/test
# Conflicts:
#	app/src/main/java/com/yizhuan/erban/ui/widget/dialog/AllServiceGiftLevelDialog.kt
#	app/src/main/res/values/strings.xml
2023-10-30 12:45:11 +08:00
Max
34a5571338 feat:完成礼物飘窗跳转提示 2023-10-30 12:35:56 +08:00
Max
5b4eeb80e8 Merge branch 'v2.2.0/red_package' into v2.2.0/test 2023-10-29 23:14:28 +08:00
Max
f7889ace18 feat:完善游戏房、个播房红包展示
feat:完善红包冲突场景
2023-10-29 23:14:20 +08:00
Max
cfc909df42 Merge branch 'v2.2.0/float_gift' into v2.2.0/test
# Conflicts:
#	app/src/main/java/com/yizhuan/erban/ui/widget/dialog/AllServiceGiftLevelDialog.kt
#	app/src/main/res/layout/dialog_gift_all_service_level.xml
#	app/src/main/res/values/colors.xml
#	app/src/main/res/values/strings.xml
2023-10-28 12:56:42 +08:00
Max
ebc989cccf feat:使用动态比例实现飘窗礼物布局(待验证) 2023-10-28 12:25:24 +08:00
Max
5ad1c017c3 feat:完善礼物飘窗文本样式 2023-10-28 11:43:19 +08:00
Max
15a80f5537 feat:初步完成全服飘窗礼物UI优化 2023-10-27 20:06:11 +08:00
Max
38fde6109b Merge branch 'v2.2.0/red_package' into v2.2.0/dev
# Conflicts:
#	gradle.properties
2023-10-27 17:09:46 +08:00
Max
3199114ff6 fix:修复开红包结果页的view隐藏展示问题
fix:修复发红包背景展示问题
2023-10-27 17:06:40 +08:00
Max
57139f1f97 feat:完善全服红包跳转逻辑 2023-10-27 16:32:54 +08:00
Max
c7d7d98873 feat:完善抢红包条件的完成路径跳转
feat:完善抢红包细节
2023-10-27 13:01:05 +08:00
Max
d7da6d4be4 feat:完善抢红包文案和交互 2023-10-27 11:21:13 +08:00
Max
b9a2f03184 feat:完善红包入口逻辑
feat:初步可以领取红包
2023-10-27 02:10:55 +08:00
Max
5ef9be75d2 feat:初步搭建新房间框架
feat:初步搭建红包处理器与组件等(未完成)
2023-10-26 20:17:11 +08:00
Max
cf3ab9ce84 feat:调整发红包部分字段 2023-10-25 18:25:31 +08:00
Max
3ba31c46d8 feat:补充支付订单为空的判断 2023-10-25 17:14:31 +08:00
Max
e8f7eca1af fix:修复google支付回调时导致的空指针异常
fix:完善房间上麦时权限申请的前置状态判断
2023-10-25 16:56:05 +08:00
Max
d93b6fbf60 feat:新增core模块(核心组件模块,慢慢整理重构) 2023-10-25 16:48:32 +08:00
Max
6ec57834fd feat:初步完成发红包接口对接
feat:增加服务器时间字段
2023-10-25 15:17:08 +08:00
Max
c3dab80e71 feat:初步完成房间红包入口组件UI
feat:完善网络调试工具Stetho的配置
2023-10-24 19:06:04 +08:00
Max
60e56beb43 feat:完成打开红包弹窗UI 2023-10-24 15:40:07 +08:00
Max
a0667bdd8d feat:初步完成领红包弹窗UI框架 2023-10-24 14:12:42 +08:00
Max
ba65ad680f feat:完成发红包UI国际化 2023-10-24 10:29:47 +08:00
Max
5163c2dc9d feat:初步完成发红包弹窗UI 2023-10-23 20:15:02 +08:00
4432 changed files with 20894 additions and 16205 deletions

BIN
ananplay.jks Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 B

View File

@@ -1,6 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
//apply plugin: 'com.google.gms.google-services'
//apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply plugin: 'com.tencent.vasdolly'
apply from: '../mob.gradle'
@@ -11,7 +11,7 @@ android {
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
defaultConfig {
applicationId "com.vele.pekolive"
applicationId "com.vele.habuplay"
minSdkVersion MIN_SDK_VERSION.toInteger()
targetSdkVersion TARGET_SDK_VERSION.toInteger()
versionCode Integer.valueOf(version_code)
@@ -22,7 +22,7 @@ android {
flavorDimensions 'default'
manifestPlaceholders = [CRASHLYTICS_COLLECTION_ENABLED: CRASHLYTICS_COLLECTION_ENABLED.toBoolean()]
// manifestPlaceholders = [CRASHLYTICS_COLLECTION_ENABLED: CRASHLYTICS_COLLECTION_ENABLED.toBoolean()]
}
splits {
@@ -60,7 +60,7 @@ android {
if (abi == null) {
abi = "universal"
}
outputFileName = "piko_${buildType.name}_v${defaultConfig.versionName}_${abi}_${date}.apk"
outputFileName = "habu_${buildType.name}_v${defaultConfig.versionName}_${abi}_${date}.apk"
}
}
@@ -81,19 +81,19 @@ android {
signingConfigs {
v2 {
storeFile file('../pekolive.jks')
storePassword "peko2023"
keyAlias "pekolive"
keyPassword "peko2023"
storeFile file('../ananplay.jks')
storePassword "vele2021"
keyAlias "ananplay"
keyPassword "vele2021"
v2SigningEnabled true
v1SigningEnabled true
}
v1 {
storeFile file('../pekolive.jks')
storePassword "peko2023"
keyAlias "pekolive"
keyPassword "peko2023"
storeFile file('../ananplay.jks')
storePassword "vele2021"
keyAlias "ananplay"
keyPassword "vele2021"
v2SigningEnabled false
v1SigningEnabled true
}
@@ -148,13 +148,13 @@ android {
buildTypes {
def server_url_debug = '"http://beta.api.pekolive.com/"'
def server_url_release = '"https://api.pekolive.com/"'
def server_url_release = '"https://api.anan.chat/"'
debug {
println("minifyEnabled = " + minify_enabled)
ext.enableCrashlytics = false
ext.alwaysUpdateBuildId = false // Firebase Crashlytics禁用更新构建ID
// ext.enableCrashlytics = false
// ext.alwaysUpdateBuildId = false // Firebase Crashlytics禁用更新构建ID
buildConfigField "String", "BASE_URL", server_url_debug
buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL"
@@ -176,10 +176,10 @@ android {
release {
ext.enableCrashlytics = CRASHLYTICS_COLLECTION_ENABLED.toBoolean()
ext.alwaysUpdateBuildId = CRASHLYTICS_COLLECTION_ENABLED.toBoolean()
firebaseCrashlytics {
//Firebase Crashlytics控制上传混淆文件开关
mappingFileUploadEnabled CRASHLYTICS_COLLECTION_ENABLED.toBoolean()
}
// firebaseCrashlytics {
// //Firebase Crashlytics控制上传混淆文件开关
// mappingFileUploadEnabled CRASHLYTICS_COLLECTION_ENABLED.toBoolean()
// }
buildConfigField "String", "BASE_URL", server_url_release
buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL"
@@ -285,15 +285,15 @@ dependencies {
implementation 'com.github.zhpanvip:BannerViewPager:3.5.6'
//fireBase
implementation platform('com.google.firebase:firebase-bom:31.1.1')
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
// implementation platform('com.google.firebase:firebase-bom:31.1.1')
// implementation 'com.google.firebase:firebase-crashlytics-ktx'
// implementation 'com.google.firebase:firebase-analytics-ktx'
//Adjust接入
implementation 'com.adjust.sdk:adjust-android:4.33.0'
implementation 'com.android.installreferrer:installreferrer:2.2'
// implementation 'com.adjust.sdk:adjust-android:4.33.0'
// implementation 'com.android.installreferrer:installreferrer:2.2'
// Add the following if you are using the Adjust SDK inside web views on your app
implementation 'com.adjust.sdk:adjust-android-webbridge:4.33.0'
// implementation 'com.adjust.sdk:adjust-android-webbridge:4.33.0'
implementation 'com.github.yalantis:ucrop:2.2.7'
@@ -310,7 +310,7 @@ channel {
outputDir = new File(project.buildDir, "channelapk")
//多渠道包的命名规则,默认为:${appName}-${versionName}-${versionCode}-${flavorName}-${buildType}-${buildTime}
def only64 = onlyArm64 ? "-only64" : ""
apkNameFormat = 'piko-${buildType}only64-${flavorName}-v${versionName}-${buildTime}'.replace("only64", only64)
apkNameFormat = 'habu-${buildType}only64-${flavorName}-v${versionName}-${buildTime}'.replace("only64", only64)
//快速模式生成渠道包时不进行校验速度可以提升10倍以上默认为false
fastMode = false
//buildTime的时间格式默认格式yyyyMMdd-HHmmss

View File

@@ -1,39 +0,0 @@
{
"project_info": {
"project_number": "656602722869",
"project_id": "pekolive-30f9e",
"storage_bucket": "pekolive-30f9e.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:656602722869:android:dac206f8aae0ba9021f77c",
"android_client_info": {
"package_name": "com.vele.pekolive"
}
},
"oauth_client": [
{
"client_id": "656602722869-sss2inirem512et0015kdqjp39mqgn96.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDDoTSpY3wxOefVDVKRmE9cDiT1iv8Ra-4"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "656602722869-sss2inirem512et0015kdqjp39mqgn96.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -117,19 +117,19 @@
-keep class com.netease.** {*;}
# Presenter 相关
-keep class com.yizhuan.erban.base.** { *; }
-keep public class * extends com.yizhuan.erban.base.BaseMvpPresenter
-keep class com.yizhuan.habu.base.** { *; }
-keep public class * extends com.yizhuan.habu.base.BaseMvpPresenter
-keep public class * extends com.yizhuan.xchat_android_library.base.factory.AbstractMvpPresenter
# 云信自定义 ViewHolder 配置
-dontwarn com.yizhuan.erban.ui.im.recent.holder.**
-keep class com.yizhuan.erban.ui.im.recent.holder.** {*;}
-keep class com.yizhuan.erban.ui.im.chat.** {*;}
-keep class com.yizhuan.erban.luckymoney.viewholder.** {*;}
-keep class com.yizhuan.erban.share.viewholder.** {*;}
-keep class com.yizhuan.erban.public_chat_hall.msg.viewholder.** {*;}
-keep class com.yizhuan.erban.module_hall.im.msgholder.** {*;}
-keep class com.yizhuan.tutu.mentoring_relationship.viewholder.** {*;}
-dontwarn com.yizhuan.habu.ui.im.recent.holder.**
-keep class com.yizhuan.habu.ui.im.recent.holder.** {*;}
-keep class com.yizhuan.habu.ui.im.chat.** {*;}
-keep class com.yizhuan.habu.luckymoney.viewholder.** {*;}
-keep class com.yizhuan.habu.share.viewholder.** {*;}
-keep class com.yizhuan.habu.public_chat_hall.msg.viewholder.** {*;}
-keep class com.yizhuan.habu.module_hall.im.msgholder.** {*;}
-keep class com.yizhuan.habu.mentoring_relationship.viewholder.** {*;}
-keep public class * extends com.netease.nim.uikit.common.ui.recyclerview.holder.RecyclerViewHolder {*;}
-keep public class * extends com.netease.nim.uikit.business.session.viewholder.MsgViewHolderBase {*;}
@@ -201,8 +201,8 @@
<init>(...);
}
-dontwarn com.yizhuan.erban.bindadapter.**
-keep class com.yizhuan.erban.bindadapter.** {*;}
-dontwarn com.yizhuan.habu.bindadapter.**
-keep class com.yizhuan.habu.bindadapter.** {*;}
# Ping++ 混淆过滤
-dontwarn com.pingplusplus.**
@@ -236,7 +236,7 @@
-dontwarn com.yizhuan.xchat_android_core.**
-keep class com.yizhuan.xchat_android_core.** {*;}
-keep class com.yizhuan.treasure_box.bean.** {*;}
-keep class com.yizhuan.erban.avroom.bean.** {*;}
-keep class com.yizhuan.habu.avroom.bean.** {*;}
#百度统计
@@ -310,8 +310,8 @@
-keep class com.autonavi.aps.amapapi.model.**{*;}
#暂时keep这个View排查华为oom问题
-keep class com.yizhuan.erban.avroom.widget.MicroView{*;}
-keep class com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView{*;}
-keep class com.yizhuan.habu.avroom.widget.MicroView{*;}
-keep class com.yizhuan.habu.ui.widget.rollviewpager.RollPagerView{*;}
#linkedMe
-keep class com.microquation.linkedme.android.** { *; }
@@ -369,7 +369,7 @@
-dontwarn com.meizu.cloud.**
-keep class com.meizu.cloud.** {*;}
-keep class com.yizhuan.erban.ui.widget.AppBarLayoutBehavior {*;}
-keep class com.yizhuan.habu.ui.widget.AppBarLayoutBehavior {*;}
#ViewBinding使用的反射生成的对应Binding
-keepclassmembers class * implements androidx.viewbinding.ViewBinding {

View File

@@ -1,4 +1,4 @@
package com.yizhuan.erban;
package com.yizhuan.habu;
import static org.junit.Assert.assertEquals;
@@ -22,7 +22,7 @@ public class ExampleInstrumentedTest {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.yizhuan.erban_android_client", appContext.getPackageName());
assertEquals("com.yizhuan.habu_android_client", appContext.getPackageName());
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.yizhuan.erban">
package="com.yizhuan.habu">
<uses-sdk tools:overrideLibrary="com.huawei.android.hms.base,com.huawei.android.hms.push" />
@@ -92,6 +92,7 @@
android:networkSecurityConfig="@xml/network_security_config"
android:resizeableActivity="true"
android:supportsRtl="true"
android:testOnly="false"
android:theme="@style/MyMaterialTheme"
tools:replace="android:name,android:allowBackup"
tools:targetApi="n">
@@ -112,23 +113,23 @@
则需要考虑发起的intent会出现相同应用图标的选择对话框的情况
参考集成文档:https://www.linkedme.cc/docs/page4.html#link1
-->
<intent-filter>
<!-- <intent-filter>-->
<!-- 此处scheme值需要替换为后台设置中的scheme值 -->
<action android:name="android.intent.action.VIEW" />
<!-- &lt;!&ndash; 此处scheme值需要替换为后台设置中的scheme值 &ndash;&gt;-->
<!-- <action android:name="android.intent.action.VIEW" />-->
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- <category android:name="android.intent.category.DEFAULT" />-->
<!-- <category android:name="android.intent.category.BROWSABLE" />-->
<data
android:host="main"
android:scheme="pikoapp" />
</intent-filter>
<!-- <data-->
<!-- android:host="main"-->
<!-- android:scheme="pikoapp" />-->
<!-- </intent-filter>-->
</activity>
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="${CRASHLYTICS_COLLECTION_ENABLED}" /> <!-- 刘海屏适配 begin -->
<!-- <meta-data-->
<!-- android:name="firebase_crashlytics_collection_enabled"-->
<!-- android:value="${CRASHLYTICS_COLLECTION_ENABLED}" /> &lt;!&ndash; 刘海屏适配 begin &ndash;&gt;-->
<!-- 小米 -->
<activity
android:name="com.soundcloud.android.crop.CropImageActivity"
@@ -161,7 +162,7 @@
如果 SDKOptions 中提供了,取 SDKOptions 中的值。
-->
<activity
android:name="com.vele.pekolive.lineapi.LineAuthenticationCallbackActivity"
android:name="com.vele.habuplay.lineapi.LineAuthenticationCallbackActivity"
android:exported="true"
android:launchMode="singleTask"
android:noHistory="true">
@@ -222,7 +223,7 @@
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="Piko"
android:label="Habu Live"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> <!-- 配置的service和receiver -->
@@ -259,12 +260,12 @@
android:label="房间流水"
android:screenOrientation="portrait" />
<activity
android:name="com.yizhuan.tutu.music.activity.AddLocalMusicListActivity"
android:name="com.yizhuan.habu.music.activity.AddLocalMusicListActivity"
android:label="@string/main_androidmanifest_010"
android:screenOrientation="portrait"
android:theme="@style/AVRoomTheme" />
<activity
android:name="com.yizhuan.tutu.music.activity.MusicListActivity"
android:name="com.yizhuan.habu.music.activity.MusicListActivity"
android:label="@string/main_androidmanifest_011"
android:launchMode="singleTop"
android:screenOrientation="portrait"
@@ -649,7 +650,7 @@
android:name=".module_hall.team.activity.HTeamMemberListActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.yizhuan.tutu.mentoring_relationship.activity.MentoringRelationshipActivity"
android:name="com.yizhuan.habu.mentoring_relationship.activity.MentoringRelationshipActivity"
android:label="@string/main_androidmanifest_030"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustResize" />
@@ -658,26 +659,26 @@
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.NimRoomP2PMessageActivity"
android:name="com.yizhuan.habu.room_chat.activity.NimRoomP2PMessageActivity"
android:theme="@style/room_message_activity" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.RoomMsgActivity"
android:name="com.yizhuan.habu.room_chat.activity.RoomMsgActivity"
android:theme="@style/room_message_activity" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.RoomNewbieActivity"
android:name="com.yizhuan.habu.room_chat.activity.RoomNewbieActivity"
android:theme="@style/room_message_activity" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.RoomNewbieMessageActivity"
android:name="com.yizhuan.habu.room_chat.activity.RoomNewbieMessageActivity"
android:theme="@style/room_message_activity" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.RoomInviteFansActivity"
android:name="com.yizhuan.habu.room_chat.activity.RoomInviteFansActivity"
android:theme="@style/room_message_activity" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.NimTeamRoomMessageActivity"
android:name="com.yizhuan.habu.room_chat.activity.NimTeamRoomMessageActivity"
android:screenOrientation="portrait"
android:theme="@style/room_message_activity" />
<activity
android:name="com.yizhuan.tutu.room_chat.activity.NimHallTeamRoomMessageActivity"
android:name="com.yizhuan.habu.room_chat.activity.NimHallTeamRoomMessageActivity"
android:screenOrientation="portrait"
android:theme="@style/room_message_activity" />
<activity
@@ -762,7 +763,7 @@
android:name=".bank_card.activity.AddBankCardAgreementActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.tongdaxing.erban.sadmin.RoomSAdminManagerActivity"
android:name="com.yizhuan.habu.sadmin.RoomSAdminManagerActivity"
android:screenOrientation="portrait" />
<activity
android:name=".home.activity.CommunityNoticeAct"
@@ -829,6 +830,10 @@
<activity
android:name=".ui.webview.DatingRuleWebViewActivity"
android:theme="@style/dialog_web_view_activity" />
<activity
android:name=".ui.webview.room_banner.RoomBannerWebDialogActivity"
android:theme="@style/dialog_web_view_activity"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.webview.TarotPayWebViewActivity"
android:theme="@style/dialog_web_view_activity" />
@@ -957,11 +962,6 @@
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.login.LoginBoundAuthCodeActivity"
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.setting.ShieldManageActivity"
android:configChanges="screenSize|orientation|keyboardHidden|mcc|mnc|locale|touchscreen|screenLayout|keyboard|navigation|fontScale|uiMode|smallestScreenSize|layoutDirection"
@@ -1062,30 +1062,6 @@
android:name=".service.DaemonService"
android:enabled="true" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name=".avroom.room_album.RoomAlbumActivity" />
</application>

View File

@@ -13,8 +13,8 @@ import com.jph.takephoto.permission.InvokeListener;
import com.jph.takephoto.permission.PermissionManager;
import com.jph.takephoto.permission.PermissionManager.TPermissionType;
import com.jph.takephoto.permission.TakePhotoInvocationHandler;
import com.yizhuan.erban.R;
import com.yizhuan.erban.base.BaseActivity;
import com.yizhuan.habu.R;
import com.yizhuan.habu.base.BaseActivity;
/**
* 继承这个类来让Activity获取拍照的能力<br>

View File

@@ -12,7 +12,7 @@ import com.jph.takephoto.model.TResult;
import com.jph.takephoto.permission.InvokeListener;
import com.jph.takephoto.permission.PermissionManager;
import com.jph.takephoto.permission.TakePhotoInvocationHandler;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
/**
* 继承这个类来让Fragment获取拍照的能力<br>

View File

@@ -12,7 +12,7 @@ import com.jph.takephoto.model.TResult;
import com.jph.takephoto.permission.InvokeListener;
import com.jph.takephoto.permission.PermissionManager;
import com.jph.takephoto.permission.TakePhotoInvocationHandler;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
/**
* 继承这个类来让Activity获取拍照的能力<br>

View File

@@ -35,7 +35,7 @@ import com.jph.takephoto.uitl.TUriParse;
import com.jph.takephoto.uitl.TUtils;
import com.orhanobut.logger.Logger;
import com.soundcloud.android.crop.Crop;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
import java.io.File;

View File

@@ -7,7 +7,7 @@ import android.graphics.BitmapFactory;
import android.os.Handler;
import com.jph.takephoto.uitl.TFileUtils;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
import com.yizhuan.xchat_android_library.utils.ResUtil;
import java.io.ByteArrayOutputStream;

View File

@@ -1,5 +1,5 @@
package com.jph.takephoto.model;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
import com.yizhuan.xchat_android_library.utils.ResUtil;
/**

View File

@@ -13,7 +13,7 @@ import com.jph.takephoto.app.TakePhoto;
import com.jph.takephoto.model.InvokeParam;
import com.jph.takephoto.model.TContextWrap;
import com.jph.takephoto.uitl.TConstant;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
import com.yizhuan.xchat_android_library.utils.ResUtil;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;

View File

@@ -12,7 +12,7 @@ import android.webkit.MimeTypeMap;
import com.jph.takephoto.model.TException;
import com.jph.takephoto.model.TExceptionType;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
import com.yizhuan.xchat_android_library.utils.ResUtil;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;

View File

@@ -20,7 +20,7 @@ import com.jph.takephoto.model.TExceptionType;
import com.jph.takephoto.model.TImage;
import com.jph.takephoto.model.TIntentWap;
import com.soundcloud.android.crop.Crop;
import com.yizhuan.erban.R;
import com.yizhuan.habu.R;
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
import java.io.File;

View File

@@ -1,4 +1,4 @@
package com.vele.pekolive.lineapi;
package com.vele.habuplay.lineapi;
import cn.sharesdk.line.LineHandlerActivity;

View File

@@ -1,120 +0,0 @@
package com.yizhuan.erban;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Build;
import androidx.appcompat.app.AppCompatActivity;
import com.mob.moblink.MobLink;
import com.mob.moblink.Scene;
import com.mob.moblink.SceneRestorable;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.yizhuan.erban.other.activity.SplashActivity;
import com.yizhuan.xchat_android_core.linked.LinkedModel;
import com.yizhuan.xchat_android_core.linked.bean.LinkedInfo;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.utils.TextUtils;
import java.util.HashMap;
import java.util.List;
public class AgentActivity extends AppCompatActivity implements SceneRestorable {
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
MobLink.updateNewIntent(getIntent(), this);
}
@Override
public void onReturnSceneData(Scene scene) {
try {
HashMap<String, Object> hashMap = scene.getParams();
LogUtil.print("linkedme", hashMap);
//根据key获取传入的参数的值,该key关键字View可为任意值,由集成方规定,请与web端商议,一致即可
LinkedInfo linkedInfo = new LinkedInfo();
String roomuid = (String) hashMap.get("roomuid");
String uid = (String) hashMap.get("uid");
String type = String.valueOf(hashMap.get("type"));
String familyId = (String) hashMap.get("familyId");
String url = (String) hashMap.get("url");
String worldId = (String) hashMap.get("worldId");
String dynamicId = (String) hashMap.get("dynamicId");
String inviteCode = (String) hashMap.get("inviteCode");
if (roomuid != null) {
linkedInfo.setRoomUid(roomuid);
}
if (TextUtils.isEmptyText(roomuid) && uid != null) {
linkedInfo.setRoomUid(uid);
}
if (uid != null) {
linkedInfo.setUid(uid);
}
linkedInfo.setType(type);
if (familyId != null) {
linkedInfo.setFamilyId(familyId);
}
if (url != null) {
linkedInfo.setUrl(url);
}
if (worldId != null) {
linkedInfo.setWorldId(worldId);
}
if (dynamicId != null) {
linkedInfo.setDynamicId(dynamicId);
}
linkedInfo.setInviteCode(inviteCode);
LinkedModel.get().setLinkedInfo(linkedInfo);
} catch (Exception e) {
}
if (isExistMainActivity(MainActivity.class) && UserModel.get().getCacheLoginUserInfo() != null) {//应用已开启&用户信息以获取
MainActivity.handleLinkedJump(this);
} else {//应用未开启
SplashActivity.start(this);
}
finish();
}
public boolean isExistMainActivity(Class<?> activity) {
try {
Intent intent = new Intent(this, activity);
ComponentName cmpName = intent.resolveActivity(getPackageManager());
boolean flag = false;
if (cmpName != null) {
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
List<ActivityManager.AppTask> taskInfoList = am.getAppTasks();
for (ActivityManager.AppTask taskInfo : taskInfoList) {
if (taskInfo.getTaskInfo().baseActivity.equals(cmpName)) {
flag = true;
break;
}
}
} else {
List<ActivityManager.RunningTaskInfo> taskInfoList = am.getRunningTasks(10);
for (ActivityManager.RunningTaskInfo taskInfo : taskInfoList) {
if (taskInfo.baseActivity.equals(cmpName)) {
flag = true;
break;
}
}
}
}
return flag;
} catch (Throwable e) {
return false;
}
}
}

View File

@@ -1,130 +0,0 @@
package com.yizhuan.erban.application;
import android.os.Bundle;
import android.text.TextUtils;
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustConfig;
import com.adjust.sdk.AdjustEvent;
import com.adjust.sdk.LogLevel;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.gson.Gson;
import com.orhanobut.logger.Logger;
import com.yizhuan.xchat_android_constants.XChatConstants;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
import java.util.Map;
/**
* 统一埋点事件
* create by lvzebiao @2019/8/14
*/
public class ReportManager implements IReportService {
private static final String TAG = "ReportManager";
private ReportManager() {
}
private static final class Helper {
private static final ReportManager INSTANCE = new ReportManager();
}
public static ReportManager get() {
return Helper.INSTANCE;
}
public void init() {
initFirebase();
initAdjust();
}
/**
* 初始化Firebase相关库
*/
private void initFirebase() {
// FirebaseCrashlytics注册公共属性
FirebaseCrashlytics.getInstance().setCustomKey(IReportConstants.CHANNEL, AppMetaDataUtil.getChannelID());
// FirebaseAnalytics注册公共属性
Bundle params = new Bundle();
if (AuthModel.get().getCurrentUid() != 0) {
params.putLong(IReportConstants.UID, AuthModel.get().getCurrentUid());
}
params.putString(IReportConstants.CHANNEL, AppMetaDataUtil.getChannelID());
setFirebaseAnalyticsDefaultEventParameters(params);
}
//Adjust初始化
private void initAdjust() {
String appToken = XChatConstants.ADJUST_APP_TOKEN;
String environment;
if (XChatApplication.isDebug()) {
environment = AdjustConfig.ENVIRONMENT_SANDBOX;
} else {
environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
}
AdjustConfig config = new AdjustConfig(XChatApplication.instance(), appToken, environment);
config.setLogLevel(LogLevel.WARN);
Adjust.onCreate(config);
}
/**
* 设置FirebaseAnalytics公共属性
*
* @param bundle 公共属性
*/
@Override
public void setFirebaseAnalyticsDefaultEventParameters(Bundle bundle) {
if (bundle != null) {
FirebaseAnalytics.getInstance(XChatApplication.instance()).setDefaultEventParameters(bundle);
}
}
/**
* 埋点,不需要上报网络质量和事件耗时
*
* @param eventId 事件名称
*/
@Override
public void reportEvent(String eventId) {
reportEvent(eventId, null);
}
/**
* 埋点
*
* @param eventId 事件名称
* @param map 事件参数和值
*/
@Override
public void reportEvent(String eventId, Map<String, Object> map) {
try {
Logger.i(TAG, "reportEvent: eventId=%s, map=%s", eventId, new Gson().toJson(map));
Bundle bundle = null;
if (map != null) {
bundle = new Bundle();
for (Map.Entry<String, Object> item : map.entrySet()) {
String key = item.getKey();
Object value = item.getValue();
if (!TextUtils.isEmpty(key) && value != null) {
bundle.putString(key, String.valueOf(value));
}
}
}
//所有事件都上报到Google Analytics
FirebaseAnalytics.getInstance(XChatApplication.instance()).logEvent(eventId, bundle);
} catch (Exception e) {
Logger.e(TAG, "reportEvent", e);
}
}
@Override
public void reportAdjustEvent(String eventId) {
AdjustEvent adjustEvent = new AdjustEvent(eventId);
Adjust.trackEvent(adjustEvent);
}
}

Some files were not shown because too many files have changed in this diff Show More