1:修改当腾讯im出现账号被挤掉,让退出应用
2:更改官方公告,系统消息,出现上滑不展示数据
This commit is contained in:
2
.idea/deploymentTargetSelector.xml
generated
2
.idea/deploymentTargetSelector.xml
generated
@@ -4,7 +4,7 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-09-18T12:45:46.137835600Z">
|
||||
<DropdownSelection timestamp="2025-09-27T07:43:19.842817300Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=6705124a" />
|
||||
|
||||
@@ -25,7 +25,8 @@ android {
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [
|
||||
AROUTER_MODULE_NAME: project.getName()
|
||||
// AROUTER_MODULE_NAME: project.getName()
|
||||
AROUTER_MODULE_NAME: android.defaultConfig.applicationId
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -55,7 +56,7 @@ android {
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
@@ -77,7 +78,9 @@ android {
|
||||
|
||||
debug {
|
||||
debuggable true
|
||||
minifyEnabled true
|
||||
minifyEnabled false
|
||||
// applicationIdSuffix ".test" // 为测试包添加包名后缀
|
||||
// resValue("string", "app_name", "秘地测试版")
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.debug
|
||||
|
||||
@@ -116,7 +119,7 @@ android {
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
jvmTarget = '11'
|
||||
}
|
||||
dexOptions {
|
||||
dexInProcess true
|
||||
@@ -144,13 +147,7 @@ dependencies {
|
||||
implementation files('libs/logger-2.2.2-release.aar')
|
||||
implementation files('libs/main-2.2.3-release.aar')
|
||||
|
||||
implementation files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||
|
||||
|
||||
implementation(libs.arouter.api.v150)
|
||||
//annotationProcessor
|
||||
annotationProcessor libs.arouter.compiler
|
||||
implementation project(':modulevocal') // 必须
|
||||
annotationProcessor project(':modulevocal') // 关键!
|
||||
|
||||
@@ -158,6 +155,10 @@ dependencies {
|
||||
api project(":moduleLogin")
|
||||
implementation project(':modulemain')
|
||||
|
||||
implementation(libs.arouter.api.v150)
|
||||
//annotationProcessor
|
||||
annotationProcessor libs.arouter.compiler
|
||||
|
||||
//aar的名称,例如:WbCloudFaceLiveSdk-v6.0.0-1234567.aar,填入'WbCloudFaceLiveSdk-v6.0.0-1234567'
|
||||
// implementation(name: 'WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc', ext: 'aar')
|
||||
////2. 云normal SDK,
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMConversationListener;
|
||||
import com.tencent.imsdk.v2.V2TIMConversationManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSDKListener;
|
||||
@@ -146,6 +147,14 @@ public abstract class BaseMvpActivity<P extends IPresenter, VDB extends ViewData
|
||||
@Override
|
||||
public void onKickedOffline() {
|
||||
// queren1();
|
||||
if (CommonAppContext.getInstance().playId!=null){
|
||||
ToastUtils.showShort("您的账号已被挤下线");
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
private int page = 1;
|
||||
private BaseQuickAdapter<NewsMessageList, BaseViewHolder> mAdapter;
|
||||
private String type;
|
||||
private boolean isRefresh = true; // 添加标志位区分刷新和加载更多
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
@@ -49,14 +48,12 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
isRefresh = false; // 设置为加载更多模式
|
||||
MvpPre.getMessagetitle(type, page + "", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
isRefresh = true; // 设置为刷新模式
|
||||
MvpPre.getMessagetitle(type, page + "", "10");
|
||||
}
|
||||
});
|
||||
@@ -127,15 +124,7 @@ public class OfficialNoticeActivity extends BaseMvpActivity<NewsPresenter, Activ
|
||||
|
||||
@Override
|
||||
public void showNews(List<NewsMessageList> newsList) {
|
||||
if (isRefresh) {
|
||||
// 下拉刷新
|
||||
mAdapter.setNewData(newsList);
|
||||
} else {
|
||||
// 上拉加载更多
|
||||
if (newsList!=null) {
|
||||
mAdapter.addData(newsList);
|
||||
}
|
||||
}
|
||||
mAdapter.setNewData(newsList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -434,8 +434,8 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
// startService(mqttServiceIntent);
|
||||
// }
|
||||
|
||||
mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.181.248","android-"+ MqttClient.generateClientId());
|
||||
// mqttConnect=MqttConnect.getInstance(this,"tcp://62.234.12.147","android-"+ MqttClient.generateClientId());
|
||||
// mqttConnect=MqttConnect.getInstance(this,"tcp://1.13.181.248","android-"+ MqttClient.generateClientId());
|
||||
mqttConnect=MqttConnect.getInstance(this,"tcp://62.234.12.147","android-"+ MqttClient.generateClientId());
|
||||
mqttConnect.mqttClient();
|
||||
|
||||
// 每次启动应用时重置状态
|
||||
@@ -789,7 +789,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
|
||||
@Override
|
||||
public void onActivityStarted(@NonNull Activity activity) {
|
||||
|
||||
AppLifecycleUtil.onAppFrontGround();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -801,6 +801,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
}
|
||||
// handleAppForeground(activity);
|
||||
// AppStateManager.setRoomActivityMinimized(false);
|
||||
AppLifecycleUtil.onAppFrontGround();
|
||||
}
|
||||
activityCount++;
|
||||
}
|
||||
@@ -813,6 +814,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
if (appStateListener != null) {
|
||||
appStateListener.onAppBackground();
|
||||
}
|
||||
AppLifecycleUtil.onAppBackGround();
|
||||
// handleAppBackground(activity);
|
||||
// AppStateManager.setRoomActivityMinimized( true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.xscm.moduleutil.utils.config;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import com.blankj.utilcode.BuildConfig;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
|
||||
/**
|
||||
*@author
|
||||
*@data
|
||||
@@ -25,13 +28,34 @@ public class EnvironmentPrefs {
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
// 获取当前选择的环境,默认为 PRODUCTION
|
||||
// 获取当前选择的环境,默认根据构建变体决定
|
||||
public EnvironmentEnum getSelectedEnvironment() {
|
||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.TEST.name());
|
||||
// // 检查是否是debug版本(开发版本)
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// return EnvironmentEnum.TEST;
|
||||
// }
|
||||
//
|
||||
// // 检查flavor类型
|
||||
// if ("dev".equals(BuildConfig.FLAVOR)) {
|
||||
// return EnvironmentEnum.TEST;
|
||||
// }
|
||||
//
|
||||
// // 检查包名判断是否为开发版本
|
||||
// try {
|
||||
// String packageName = CommonAppContext.getInstance().getPackageName();
|
||||
// if (packageName.contains(".test") || packageName.contains(".dev")) {
|
||||
// return EnvironmentEnum.TEST;
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// // 忽略异常
|
||||
// }
|
||||
|
||||
// 默认使用生产环境
|
||||
String envName = sharedPreferences.getString(KEY_ENV, EnvironmentEnum.PRODUCTION.name());
|
||||
try {
|
||||
return EnvironmentEnum.valueOf(envName);
|
||||
} catch (IllegalArgumentException e) {
|
||||
return EnvironmentEnum.TEST; // 出错时默认返回生产环境
|
||||
return EnvironmentEnum.PRODUCTION; // 出错时默认返回生产环境
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,6 +126,7 @@ import com.xscm.moduleutil.event.SurfaceEvent
|
||||
import com.xscm.moduleutil.event.UnreadCountEvent
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.interfaces.AppLifecycleUtil
|
||||
import com.xscm.moduleutil.interfaces.OnMusicItemClickListener
|
||||
import com.xscm.moduleutil.listener.MessageListenerSingleton
|
||||
import com.xscm.moduleutil.listener.MessageListenerSingleton.OnMessageReceivedListener
|
||||
@@ -160,7 +161,8 @@ import java.util.stream.Collectors
|
||||
|
||||
@Route(path = ARouteConstants.ROOM_DETAILS)
|
||||
class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
RoomContacts.View, PermissionCallbacks, OnMessageReceivedListener {
|
||||
RoomContacts.View, PermissionCallbacks, OnMessageReceivedListener
|
||||
{
|
||||
private var roomFragment: RoomFragment? = null
|
||||
var commonPageAdapter: CommonPageAdapter? = null
|
||||
private var mRoomBean: RoomBean? = null
|
||||
@@ -4355,7 +4357,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
* 停止保活
|
||||
*/
|
||||
private fun stopkeepLiveService() {
|
||||
val isStartService = isServiceExisted(this, "com.example.modulerroom.RoomPlayService")
|
||||
val isStartService = isServiceExisted(this, "com.example.modulerroom.service.RoomPlayService")
|
||||
if (isStartService) {
|
||||
val stopIntent = Intent(
|
||||
this,
|
||||
@@ -4422,4 +4424,6 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
private const val CLICK_DELAY: Long = 500 // 延迟时间,单位毫秒
|
||||
private val AUDIO_PERMISSIONS = arrayOf(Manifest.permission.RECORD_AUDIO)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user