Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
b70e6f2f
Commit
b70e6f2f
authored
Jun 28, 2022
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: mdt代码优化
parent
81cf0c56
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
15 deletions
+33
-15
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+15
-3
TRTCCalling.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
+11
-10
YDLInvitionActivity.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
+7
-2
No files found.
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
b70e6f2f
...
...
@@ -9,11 +9,15 @@ import android.content.ServiceConnection
import
android.net.Uri
import
android.os.IBinder
import
android.provider.Settings
import
android.text.TextUtils
import
android.util.Log
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.launcher.ARouter
import
com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.tencent.qcloud.tuicore.calling.trtccalling.model.TRTCCalling
import
com.tencent.qcloud.tuicore.calling.videocall.Constant
import
com.tencent.qcloud.tuicore.calling.videocall.YDLInvitionActivity
import
com.umeng.analytics.MobclickAgent
import
com.ydl.audioim.YDLavManager
import
com.ydl.component.music.FragmentContainerActivity
...
...
@@ -34,7 +38,6 @@ import com.yidianling.muse.event.MeditationFloatEvent
import
com.yidianling.muse.helper.MediaPlayerManager
import
com.yidianling.muse.service.MeditationWindowService
import
com.yidianling.tests.home.NewTestHomeActivity
import
com.yidianling.user.StatusUtils
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import
com.yidianling.user.ui.login.OneKeyLoginHelp
...
...
@@ -52,7 +55,7 @@ import kotlinx.android.synthetic.main.activity_main.*
@Route
(
path
=
"/main/main"
)
class
MainActivity
:
BaseLceActivity
<
DemoContract
.
View
,
DemoContract
.
Presenter
>(),
DemoContract
.
View
{
private
var
secretDescriptionDialog
:
SecretDescriptionDialog
?
=
null
//
private var secretDescriptionDialog: SecretDescriptionDialog? = null
private
var
serviceConnection
:
ServiceConnection
?
=
null
private
var
meditationServiceConnection
:
ServiceConnection
?
=
null
...
...
@@ -227,7 +230,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_privacy
.
setOnClickListener
{
startActivity
(
Intent
(
this
@MainActivity
,
TestAppActivity
::
class
.
java
))
}
}
...
...
@@ -281,6 +283,16 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java)
// .
// (this)
val
trtcCalling
=
TRTCCalling
.
sharedInstance
(
this
)
if
(!
TextUtils
.
isEmpty
(
trtcCalling
.
mRoomId
)&&!
TextUtils
.
isEmpty
(
trtcCalling
.
mUserId
)){
val
intent
=
Intent
(
mContext
,
YDLInvitionActivity
::
class
.
java
)
intent
.
putExtra
(
Constant
.
ROOM_ID
,
trtcCalling
.
mRoomId
)
intent
.
putExtra
(
Constant
.
USER_ID
,
trtcCalling
.
mUserId
)
intent
.
putExtra
(
Constant
.
INVITE_ID
,
trtcCalling
.
mInviteId
)
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
mContext
.
startActivity
(
intent
)
}
}
override
fun
onPause
()
{
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
View file @
b70e6f2f
...
...
@@ -117,7 +117,13 @@ public class TRTCCalling {
* 是否正在接听界面
*/
public
boolean
mIsBeingInvited
=
false
;
private
String
mRoomId
=
"0"
;
/**
* 记录进入房间需要的一些信息(vivo,小米手机有后台弹出界面的权限,导致app后台状态下,消费掉通话邀请信令,再进入app无法打开通话邀请界面)
*/
public
String
mRoomId
=
""
;
public
String
mUserId
=
""
;
public
String
mInviteId
=
""
;
/**
* 当前邀请列表
* C2C通话时会记录自己邀请的用户
...
...
@@ -340,18 +346,20 @@ public class TRTCCalling {
public
void
onReceiveNewInvitation
(
String
inviteID
,
String
inviter
,
String
groupID
,
List
<
String
>
inviteeList
,
String
data
)
{
TRTCLogger
.
e
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
+
", groupID:"
+
groupID
+
", inviteeList:"
+
inviteeList
+
" data:"
+
data
);
mRoomId
=
groupID
;
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
for
(
String
s
:
inviteeList
)
{
if
(
s
.
equals
(
userModel
.
userId
)){
mRoomId
=
groupID
;
mUserId
=
userModel
.
userId
;
mInviteId
=
inviter
;
Intent
intent
=
new
Intent
(
mContext
,
YDLInvitionActivity
.
class
);
intent
.
putExtra
(
Constant
.
ROOM_ID
,
groupID
);
intent
.
putExtra
(
Constant
.
USER_ID
,
userModel
.
userId
);
intent
.
putExtra
(
Constant
.
INVITE_ID
,
inviter
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
mContext
.
startActivity
(
intent
);
}
}
if
(!
mIsInRoom
){
...
...
@@ -1194,13 +1202,6 @@ public class TRTCCalling {
return
;
}
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
// Intent intent = new Intent(mContext, YDLInvitionActivity.class);
// intent.putExtra(Constant.ROOM_ID, groupId);
// intent.putExtra(Constant.USER_ID, userModel.userId);
// intent.putExtra(Constant.INVITE_ID, userIdList.get(0));
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// internalCall(userIdList, type, groupId);
}
/**
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
View file @
b70e6f2f
...
...
@@ -59,10 +59,15 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
MDTRxActivityTool
.
addActivity
(
this
);
handleIntent
();
setContentView
(
R
.
layout
.
video_invition_activity
);
TRTCCalling
trtcCalling
=
TRTCCalling
.
sharedInstance
(
this
);
// 响铃
TRTCCalling
.
sharedInstance
(
this
)
.
startRing
();
trtcCalling
.
startRing
();
// 正在被邀请
TRTCCalling
.
sharedInstance
(
this
).
mIsBeingInvited
=
true
;
trtcCalling
.
mIsBeingInvited
=
true
;
// 清除TRTCCalling类中记录的邀请信息
trtcCalling
.
mRoomId
=
""
;
trtcCalling
.
mUserId
=
""
;
trtcCalling
.
mInviteId
=
""
;
// 发送清空通知栏的通知
EventBus
.
getDefault
().
post
(
new
ClearJPushEvent
());
initView
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment