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