1:修改上架出现的问题
This commit is contained in:
@@ -137,7 +137,7 @@ public class CommonAppContext extends MultiDexApplication implements Application
|
||||
@Getter
|
||||
public UnreadCountEvent unreadCountEvent;
|
||||
|
||||
public static int selectRelease = -1;
|
||||
public static int selectRelease = 1;
|
||||
|
||||
public int is_open = 0;//主题的开关
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
RetrofitClient.getInstance().CpListener(new CPListener() {
|
||||
@Override
|
||||
public void onReceiveMsg(@NotNull RoomMessageEvent roomMessageEvent) {
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.ActivityWebViewBinding;
|
||||
import com.xscm.modulemain.manager.RoomManager;
|
||||
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
|
||||
import com.xscm.moduleutil.activity.IPresenter;
|
||||
import com.xscm.moduleutil.activity.IView;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
@@ -54,7 +55,7 @@ import com.xscm.moduleutil.utils.SpUtil;
|
||||
* @description: webview公共方法
|
||||
*/
|
||||
@Route(path = ARouteConstants.H5)
|
||||
public class WebViewActivity extends BaseMvpActivity<IPresenter,ActivityWebViewBinding> implements IView<Activity> {
|
||||
public class WebViewActivity extends BaseAppCompatActivity<ActivityWebViewBinding> {
|
||||
|
||||
public String title;
|
||||
public String url;
|
||||
@@ -84,6 +85,7 @@ public class WebViewActivity extends BaseMvpActivity<IPresenter,ActivityWebViewB
|
||||
|
||||
if (title != null && !title.isEmpty()) {
|
||||
if (title.contains("协议")) {
|
||||
webSettings.setAllowFileAccess(true);
|
||||
webSettings.setDisplayZoomControls(false); // 隐藏默认缩放控件
|
||||
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL); // 使用正常布局算法
|
||||
webSettings.setBuiltInZoomControls(false);
|
||||
@@ -298,10 +300,10 @@ public class WebViewActivity extends BaseMvpActivity<IPresenter,ActivityWebViewB
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IPresenter bindPresenter() {
|
||||
return null;
|
||||
}
|
||||
// @Override
|
||||
// protected IPresenter bindPresenter() {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
@@ -366,6 +368,7 @@ public class WebViewActivity extends BaseMvpActivity<IPresenter,ActivityWebViewB
|
||||
return R.layout.activity_web_view;
|
||||
}
|
||||
|
||||
|
||||
public class WebAppInterface {
|
||||
Context mContext;
|
||||
String type;
|
||||
|
||||
@@ -314,7 +314,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
mBinding.ivGuanbi.setOnClickListener(this);
|
||||
mBinding.riv.setOnClickListener(this);
|
||||
// mBinding.ivShouchl.setOnClickListener( this);
|
||||
requestGpsPermissions();
|
||||
// requestGpsPermissions();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -570,7 +570,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
|
||||
private void performLocationTask() {
|
||||
// 执行定位任务
|
||||
initLocation();
|
||||
// initLocation();
|
||||
}
|
||||
|
||||
private void handlePermissionDenial() {
|
||||
|
||||
@@ -54,19 +54,19 @@ public class PolicyDialog extends Dialog {
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", "file:///android_asset/page_yongh.html").withString("title", "用户协议").navigation();
|
||||
|
||||
// 检查网络连接状态
|
||||
if (isNetworkAvailable(getContext())) {
|
||||
// 有网络时加载网络资源
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6");
|
||||
intent.putExtra("title", "用户协议");
|
||||
startActivity(intent);
|
||||
} else {
|
||||
// if (isNetworkAvailable(getContext())) {
|
||||
// // 有网络时加载网络资源
|
||||
// Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
// intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6");
|
||||
// intent.putExtra("title", "用户协议");
|
||||
// startActivity(intent);
|
||||
// } else {
|
||||
// 无网络时加载本地资源
|
||||
ARouter.getInstance().build(ARouteConstants.H5)
|
||||
.withString("url", "file:///android_asset/page_yongh.html")
|
||||
.withString("title", "用户协议")
|
||||
.navigation();
|
||||
}
|
||||
// }
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6" ).withString("title", "用户协议").navigation();
|
||||
}
|
||||
@@ -85,15 +85,15 @@ public class PolicyDialog extends Dialog {
|
||||
// intent.putExtra("title", "隐私协议");
|
||||
// startActivity(intent);
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", "file:///android_asset/page_show.html").withString("title", "隐私协议").navigation();
|
||||
if (isNetworkAvailable(getContext())) {
|
||||
Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4");
|
||||
intent.putExtra("title", "隐私协议");
|
||||
startActivity(intent);
|
||||
}else {
|
||||
// if (isNetworkAvailable(getContext())) {
|
||||
// Intent intent = new Intent(getContext(), WebViewActivity.class);
|
||||
// intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4");
|
||||
// intent.putExtra("title", "隐私协议");
|
||||
// startActivity(intent);
|
||||
// }else {
|
||||
ARouter.getInstance().build(ARouteConstants.H5).withString("url", "file:///android_asset/page_show.html").withString("title", "隐私协议").navigation();
|
||||
|
||||
}
|
||||
// }
|
||||
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4").withString("title", "隐私协议").navigation();
|
||||
}
|
||||
|
||||
|
||||
235
README.md
Normal file
235
README.md
Normal file
@@ -0,0 +1,235 @@
|
||||
# 羽声语音项目文档
|
||||
|
||||
## 项目概述
|
||||
|
||||
羽声语音是一款基于Android平台的语音社交应用,支持实时语音通信、多人语音聊天等功能。项目采用模块化架构设计,便于功能扩展和维护。
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
yusheng_new/
|
||||
├── app/ # 主应用模块
|
||||
├── BaseModule/ # 基础功能模块
|
||||
├── MainModule/ # 主要功能模块
|
||||
├── timcommon/ # 腾讯云IM通用组件
|
||||
├── tuichat/ # 腾讯云IM聊天组件
|
||||
├── tuiconversation/ # 腾讯云IM会话组件
|
||||
├── tuicore/ # 腾讯云IM核心组件
|
||||
├── animplayer/ # 动画播放组件
|
||||
├── appupdate/ # 应用更新模块
|
||||
├── locktableview/ # 锁定表格视图组件
|
||||
├── moduletablayout/ # 自定义Tab布局组件
|
||||
└── Loadinglibrary/ # 加载动画库
|
||||
```
|
||||
|
||||
## MainModule 详细说明
|
||||
|
||||
MainModule 是项目的核心功能模块,包含了应用的主要业务逻辑和界面实现。该模块采用MVP架构模式,结合Kotlin和Java混合开发,实现了丰富的社交和语音功能。
|
||||
|
||||
### 核心架构
|
||||
|
||||
- **基础类**:
|
||||
- `BaseMvpActivity.java`: MVP架构的基础Activity类,提供Presenter绑定和生命周期管理
|
||||
- `Application.kt`: 全局应用程序类,负责初始化各种服务和全局配置
|
||||
|
||||
- **功能模块**:
|
||||
- `activity/`: 包含所有主要活动的实现
|
||||
- `adapter/`: 列表适配器实现
|
||||
- `bean/`: 数据模型类
|
||||
- `dialog/`: 对话框实现
|
||||
- `manager/`: 各种管理器类
|
||||
- `model/`: 数据模型层
|
||||
- `service/`: 服务实现
|
||||
- `utils/`: 工具类
|
||||
- `view/`: 自定义视图组件
|
||||
- `widget/`: 自定义UI控件
|
||||
|
||||
### 主要功能
|
||||
|
||||
#### 1. 房间系统 (activity/room/)
|
||||
房间系统是应用的核心功能,提供语音聊天室功能:
|
||||
- **RoomActivity.kt**: 房间主界面,实现语音聊天、麦序管理、礼物互动等功能
|
||||
- **PopularRoomActivity.java**: 热门房间列表
|
||||
- **RankingListActivity.java**: 排行榜页面
|
||||
- **RedResultActivity.java**: 红包结果页面
|
||||
- **SearchActivity.java**: 房间搜索功能
|
||||
|
||||
房间功能包括:
|
||||
- 实时语音通信
|
||||
- 麦序管理(上麦、下麦、抱麦等)
|
||||
- 礼物系统(赠送、接收、礼物特效)
|
||||
- PK对战功能
|
||||
- 红包功能
|
||||
- 点歌系统
|
||||
- 聊天室互动
|
||||
|
||||
#### 2. 用户系统 (activity/user/)
|
||||
用户系统管理用户信息和相关功能:
|
||||
- 用户资料编辑
|
||||
- 个人主页
|
||||
- 钱包与充值
|
||||
- 任务系统
|
||||
- 贵族体系
|
||||
|
||||
#### 3. 消息系统 (activity/msg/)
|
||||
消息系统处理应用内的各种通知和消息:
|
||||
- 系统通知
|
||||
- 官方公告
|
||||
- 消息提醒设置
|
||||
|
||||
#### 4. 登录系统 (activity/login/)
|
||||
处理用户登录、注册和认证:
|
||||
- 登录界面
|
||||
- 注册流程
|
||||
- 实名认证
|
||||
- 密码找回
|
||||
|
||||
#### 5. 主页系统 (activity/main/)
|
||||
应用主页和相关功能:
|
||||
- 主页界面
|
||||
- 推荐内容
|
||||
- 发现功能
|
||||
|
||||
#### 6. 广场系统 (activity/plaza/)
|
||||
社交广场功能:
|
||||
- 动态发布
|
||||
- 动态浏览
|
||||
- 互动评论
|
||||
|
||||
### 技术特点
|
||||
|
||||
1. **混合开发**: 结合Kotlin和Java开发,充分利用两种语言的优势
|
||||
2. **MVP架构**: 采用MVP设计模式,分离视图、模型和展示逻辑
|
||||
3. **模块化设计**: 功能模块清晰划分,便于维护和扩展
|
||||
4. **路由管理**: 使用ARouter实现模块间导航和通信
|
||||
5. **数据绑定**: 使用DataBinding和ViewBinding简化UI操作
|
||||
6. **实时通信**: 集成腾讯云IM SDK实现即时通讯
|
||||
7. **动画效果**: 丰富的动画和过渡效果提升用户体验
|
||||
|
||||
### 关键组件
|
||||
|
||||
1. **RoomManager**: 房间管理器,处理房间创建、加入、退出等操作
|
||||
2. **TimerManager**: 计时器管理,处理各种倒计时和定时任务
|
||||
3. **WheatLayoutSingManager**: 麦序管理器,处理语音房间的麦序逻辑
|
||||
4. **自定义对话框**: 丰富的对话框组件,如礼物对话框、设置对话框等
|
||||
|
||||
### 资源文件
|
||||
|
||||
MainModule包含丰富的资源文件:
|
||||
- **布局文件**: 100+个XML布局文件,涵盖所有界面
|
||||
- **drawable资源**: 各种形状、选择器和图标资源
|
||||
- **动画资源**: 各种动画效果定义
|
||||
- **字体资源**: 自定义字体文件
|
||||
|
||||
### 依赖关系
|
||||
|
||||
MainModule依赖以下模块:
|
||||
- BaseModule: 基础功能支持
|
||||
- timcommon: 腾讯云IM通用组件
|
||||
- tuichat: 腾讯云IM聊天组件
|
||||
- tuiconversation: 腾讯云IM会话组件
|
||||
- appupdate: 应用更新功能
|
||||
- locktableview: 自定义表格视图
|
||||
|
||||
### 配置信息
|
||||
|
||||
- **命名空间**: `com.xscm.modulemain`
|
||||
- **最低SDK**: 24
|
||||
- **目标SDK**: 35
|
||||
- **编译SDK**: 35
|
||||
- **Java版本**: 17
|
||||
- **Kotlin JVM目标**: 11
|
||||
- **启用功能**: DataBinding, ViewBinding
|
||||
|
||||
## 技术栈
|
||||
|
||||
- **开发语言**: Java、Kotlin
|
||||
- **最低支持版本**: Android 7.0 (API 24)
|
||||
- **目标版本**: Android 13 (API 33)
|
||||
- **编译版本**: Android 14 (API 35)
|
||||
- **架构**: 模块化架构,使用ARouter进行路由管理
|
||||
- **UI框架**: DataBinding、ViewBinding
|
||||
- **依赖管理**: Gradle
|
||||
|
||||
## 主要功能模块
|
||||
|
||||
### 1. 语音通信
|
||||
- 实时语音通话
|
||||
- 多人语音聊天室
|
||||
- 语音消息处理
|
||||
|
||||
### 2. 即时通讯
|
||||
- 集成腾讯云IM SDK
|
||||
- 单聊功能
|
||||
- 群聊功能
|
||||
- 会话管理
|
||||
|
||||
### 3. 用户认证
|
||||
- 人脸识别认证(集成腾讯云人脸识别SDK)
|
||||
- 账号注册与登录
|
||||
- 用户信息管理
|
||||
|
||||
### 4. 应用更新
|
||||
- 自动检测更新
|
||||
- 版本管理
|
||||
- 安装包下载与安装
|
||||
|
||||
## 构建配置
|
||||
|
||||
项目支持以下构建变体:
|
||||
|
||||
1. **正式版 (releas)**
|
||||
- 应用名称: 羽声语音
|
||||
- 包名: com.qxcm.qxlive
|
||||
- 签名: 使用release签名配置
|
||||
|
||||
2. **测试版 (beta)**
|
||||
- 应用名称: 羽声-测试版
|
||||
- 包名: com.qxcm.qxlive.beta
|
||||
- 签名: 使用debug签名配置
|
||||
|
||||
## 签名配置
|
||||
|
||||
- **调试签名**: my-release-key.jks
|
||||
- 密码: 123456
|
||||
- 别名: mykey
|
||||
- 别名密码: 123456
|
||||
|
||||
- **发布签名**: midi.jks
|
||||
- 密码: 未在配置文件中显示
|
||||
|
||||
## 依赖库
|
||||
|
||||
主要依赖包括:
|
||||
|
||||
- AndroidX基础库
|
||||
- Material Design组件
|
||||
- 腾讯云IM SDK
|
||||
- 腾讯云人脸识别SDK
|
||||
- ARouter路由框架
|
||||
- 权限管理库(PermissionX)
|
||||
|
||||
## 构建说明
|
||||
|
||||
1. 克隆项目到本地
|
||||
2. 确保Android Studio版本兼容
|
||||
3. 使用Gradle同步项目
|
||||
4. 选择构建变体(releas或beta)
|
||||
5. 运行或构建应用
|
||||
|
||||
## 版本信息
|
||||
|
||||
版本号通过gradle.properties配置:
|
||||
- 版本代码: APP_VERSION_CODE
|
||||
- 版本名称: APP_VERSION_NAME
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. 项目使用了混淆,发布版本会进行代码混淆
|
||||
2. 支持的CPU架构: arm64-v8a, armeabi-v7a
|
||||
3. 使用了DataBinding和ViewBinding技术
|
||||
4. 集成了ARouter进行模块间通信
|
||||
|
||||
## 许可证
|
||||
|
||||
本项目未指定许可证,请联系项目所有者获取更多信息。
|
||||
8
local.properties
Normal file
8
local.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
## This file must *NOT* be checked into Version Control Systems,
|
||||
# as it contains information specific to your local configuration.
|
||||
#
|
||||
# Location of the SDK. This is only used by Gradle.
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
#Thu Nov 13 09:33:48 CST 2025
|
||||
sdk.dir=D\:\\AndroidSdk
|
||||
Reference in New Issue
Block a user