Skip to content

Commit fe795e0

Browse files
sevenhhesevenhhe
authored andcommitted
修复客户反馈问题(只收到了视频通话通知,没有自动调往通话界面,加强日志)
Change-Id: I1770df64b9b8d954551a34167e59b63b9afd876a
1 parent 571fd4f commit fe795e0

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@
118118
<activity android:name=".kitlink.activity.ControlPanelActivity" />
119119
<activity android:name=".kitlink.activity.AboutUsActivity" />
120120
<activity android:name=".kitlink.activity.SelectPointActivity" />
121-
<activity android:name="com.tencent.iot.explorer.link.rtc.ui.audiocall.TRTCAudioCallActivity" />
122-
<activity android:name="com.tencent.iot.explorer.link.rtc.ui.videocall.TRTCVideoCallActivity" />
121+
<activity android:name="com.tencent.iot.explorer.link.rtc.ui.audiocall.TRTCAudioCallActivity"
122+
android:screenOrientation="portrait"/>
123+
<activity android:name="com.tencent.iot.explorer.link.rtc.ui.videocall.TRTCVideoCallActivity"
124+
android:screenOrientation="portrait"/>
123125
<receiver android:name="com.tencent.iot.explorer.link.rtc.ui.utils.NetWorkStateReceiver">
124126
<intent-filter>
125127
<!--检测网络变化的acton-->

app/src/main/java/com/tencent/iot/explorer/link/App.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ import com.tencent.android.tpush.XGPushConfig
1313
import com.tencent.iot.explorer.link.core.auth.IoTAuth
1414
import com.tencent.iot.explorer.link.core.auth.callback.MyCallback
1515
import com.tencent.iot.explorer.link.core.auth.entity.DeviceEntity
16-
import com.tencent.iot.explorer.link.core.auth.entity.ProductEntity
1716
import com.tencent.iot.explorer.link.core.auth.message.MessageConst
1817
import com.tencent.iot.explorer.link.core.auth.message.payload.Payload
1918
import com.tencent.iot.explorer.link.core.auth.message.upload.ArrayString
2019
import com.tencent.iot.explorer.link.core.auth.response.*
2120
import com.tencent.iot.explorer.link.core.auth.socket.callback.ConnectionCallback
2221
import com.tencent.iot.explorer.link.core.auth.socket.callback.PayloadMessageCallback
23-
import com.tencent.iot.explorer.link.core.auth.util.JsonManager
2422
import com.tencent.iot.explorer.link.core.auth.util.Weak
2523
import com.tencent.iot.explorer.link.core.link.entity.TRTCParamsEntity
2624
import com.tencent.iot.explorer.link.core.log.L
@@ -112,6 +110,8 @@ class App : Application(), Application.ActivityLifecycleCallbacks, PayloadMessag
112110
}
113111

114112
fun appStartBeingCall(callingType: Int, deviceId: String) {
113+
L.e("App isForeground ${data.isForeground}")
114+
L.e("App isCalling ${TRTCUIManager.getInstance().isCalling}")
115115
if (data.isForeground && !TRTCUIManager.getInstance().isCalling) { //在前台,没有正在通话时,唤起通话页面
116116
TRTCUIManager.getInstance().setSessionManager(TRTCAppSessionManager())
117117

@@ -164,13 +164,13 @@ class App : Application(), Application.ActivityLifecycleCallbacks, PayloadMessag
164164
}
165165

166166
private var activityReferences = 0
167-
private var isActivityChangingConfigurations = false
168167

169168
override fun onActivityStarted(activity: Activity) {
170169
Utils.clearMsgNotify(activity, data.notificationId)
171-
if (++activityReferences == 1 && !isActivityChangingConfigurations) {
170+
if (++activityReferences == 1) {
172171
// App enters foreground
173172
data.isForeground = true
173+
L.e("App foreground")
174174
requestDeviceList()
175175
if (activity is AppLifeCircleListener) {
176176
activity.onAppGoforeground()
@@ -179,10 +179,10 @@ class App : Application(), Application.ActivityLifecycleCallbacks, PayloadMessag
179179
}
180180

181181
override fun onActivityStopped(activity: Activity) {
182-
isActivityChangingConfigurations = activity.isChangingConfigurations
183-
if (--activityReferences == 0 && !isActivityChangingConfigurations) {
182+
if (--activityReferences == 0) {
184183
// App enters background
185184
data.isForeground = false
185+
L.e("App background")
186186
if (activity is AppLifeCircleListener) {
187187
activity.onAppGoBackground()
188188
}

app/src/main/java/com/tencent/iot/explorer/link/AppData.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class AppData private constructor() {
4242
var region = "ap-guangzhou"
4343
var appLifeCircleId = "0"
4444
var notificationId = 0
45+
@Volatile
4546
var isForeground = false
4647
var callingDeviceId = "" //主动呼叫的设备的id
4748
var rtcNotificationClicked = false

0 commit comments

Comments
 (0)