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
a0bfe19b
Commit
a0bfe19b
authored
Jul 01, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release' into d/v4.3.99
# Conflicts: # config.gradle
parents
4691d183
9ab1ade6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
73 deletions
+105
-73
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+53
-31
config.gradle
config.gradle
+0
-3
PersonalInfoActivity.java
m-user/src/main/java/com/yidianling/user/mine/PersonalInfoActivity.java
+4
-6
OneKeyLoginHelp.kt
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
+12
-4
RegisterAndLoginActivity.kt
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
+5
-2
TRTCCalling.java
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
+24
-25
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 @
a0bfe19b
...
@@ -9,11 +9,15 @@ import android.content.ServiceConnection
...
@@ -9,11 +9,15 @@ import android.content.ServiceConnection
import
android.net.Uri
import
android.net.Uri
import
android.os.IBinder
import
android.os.IBinder
import
android.provider.Settings
import
android.provider.Settings
import
android.text.TextUtils
import
android.util.Log
import
android.util.Log
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.launcher.ARouter
import
com.alibaba.android.arouter.launcher.ARouter
import
com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import
com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import
com.tbruyelle.rxpermissions2.RxPermissions
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.umeng.analytics.MobclickAgent
import
com.ydl.audioim.YDLavManager
import
com.ydl.audioim.YDLavManager
import
com.ydl.component.music.FragmentContainerActivity
import
com.ydl.component.music.FragmentContainerActivity
...
@@ -34,7 +38,6 @@ import com.yidianling.muse.event.MeditationFloatEvent
...
@@ -34,7 +38,6 @@ import com.yidianling.muse.event.MeditationFloatEvent
import
com.yidianling.muse.helper.MediaPlayerManager
import
com.yidianling.muse.helper.MediaPlayerManager
import
com.yidianling.muse.service.MeditationWindowService
import
com.yidianling.muse.service.MeditationWindowService
import
com.yidianling.tests.home.NewTestHomeActivity
import
com.yidianling.tests.home.NewTestHomeActivity
import
com.yidianling.user.StatusUtils
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import
com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import
com.yidianling.user.ui.login.OneKeyLoginHelp
import
com.yidianling.user.ui.login.OneKeyLoginHelp
...
@@ -52,15 +55,15 @@ import kotlinx.android.synthetic.main.activity_main.*
...
@@ -52,15 +55,15 @@ import kotlinx.android.synthetic.main.activity_main.*
@Route
(
path
=
"/main/main"
)
@Route
(
path
=
"/main/main"
)
class
MainActivity
:
BaseLceActivity
<
DemoContract
.
View
,
DemoContract
.
Presenter
>(),
class
MainActivity
:
BaseLceActivity
<
DemoContract
.
View
,
DemoContract
.
Presenter
>(),
DemoContract
.
View
{
DemoContract
.
View
{
private
var
secretDescriptionDialog
:
SecretDescriptionDialog
?
=
null
//
private var secretDescriptionDialog: SecretDescriptionDialog? = null
private
var
serviceConnection
:
ServiceConnection
?
=
null
private
var
serviceConnection
:
ServiceConnection
?
=
null
private
var
meditationServiceConnection
:
ServiceConnection
?
=
null
private
var
meditationServiceConnection
:
ServiceConnection
?
=
null
private
var
secretDialog
:
SecretDialog
?
=
null
private
var
secretDialog
:
SecretDialog
?
=
null
protected
var
playService
:
PlayService
?
=
null
protected
var
playService
:
PlayService
?
=
null
protected
var
meditationService
:
MeditationWindowService
?=
null
protected
var
meditationService
:
MeditationWindowService
?
=
null
override
fun
getContentViewId
():
Int
{
override
fun
getContentViewId
():
Int
{
return
R
.
id
.
lce_content_view
return
R
.
id
.
lce_content_view
...
@@ -92,10 +95,14 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -92,10 +95,14 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
YdlCommonRouterManager
.
initYdlCommonRoute
(
PlatformTempCommonRouteImpl
())
YdlCommonRouterManager
.
initYdlCommonRoute
(
PlatformTempCommonRouteImpl
())
// 初始化一键登录sdk
// 初始化一键登录sdk
OneKeyLoginHelp
.
sdkInit
(
this
,
OneKeyLoginHelp
.
YDL_USER_APP
,
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
OneKeyLoginHelp
.
sdkInit
(
this
,
OneKeyLoginHelp
.
YDL_USER_APP
,
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
bindService
()
bindService
()
bindMeditationService
()
bindMeditationService
()
reLoadData
()
reLoadData
()
requestPermission
()
requestPermission
()
bt_mdt
.
setOnClickListener
{
bt_mdt
.
setOnClickListener
{
...
@@ -116,7 +123,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -116,7 +123,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// .withBoolean("bind_phone", false)
// .withBoolean("bind_phone", false)
// .withBoolean("isFromGuide", true)
// .withBoolean("isFromGuide", true)
// .navigation()
// .navigation()
OneKeyLoginHelp
.
startLogin
(
this
,
false
)
OneKeyLoginHelp
.
startLogin
(
this
,
false
)
}
}
bt_to_consultant
.
setOnClickListener
{
bt_to_consultant
.
setOnClickListener
{
// ARouter.getInstance()
// ARouter.getInstance()
...
@@ -161,7 +168,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -161,7 +168,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
startActivity
(
Intent
(
this
,
CollectSexAndBirthActivity
::
class
.
java
))
startActivity
(
Intent
(
this
,
CollectSexAndBirthActivity
::
class
.
java
))
}
}
bt_to_confide
.
setOnClickListener
{
bt_to_confide
.
setOnClickListener
{
YDLavManager
.
instances
.
login
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
)
YDLavManager
.
instances
.
login
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
)
startActivity
(
Intent
(
this
,
ConfideHomeActivity
::
class
.
java
))
startActivity
(
Intent
(
this
,
ConfideHomeActivity
::
class
.
java
))
}
}
...
@@ -227,7 +236,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -227,7 +236,6 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_privacy
.
setOnClickListener
{
bt_to_privacy
.
setOnClickListener
{
startActivity
(
Intent
(
this
@MainActivity
,
TestAppActivity
::
class
.
java
))
startActivity
(
Intent
(
this
@MainActivity
,
TestAppActivity
::
class
.
java
))
}
}
}
}
...
@@ -241,20 +249,24 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -241,20 +249,24 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
val
rxPermissions
=
RxPermissions
(
this
)
val
rxPermissions
=
RxPermissions
(
this
)
rxPermissions
.
requestEach
(
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
rxPermissions
.
requestEach
(
Manifest
.
permission
.
WRITE_EXTERNAL_STORAGE
)
.
subscribe
{
permission
->
.
subscribe
{
permission
->
if
(
permission
.
granted
)
{
when
{
ToastUtil
.
toastShort
(
"Permission Success"
)
permission
.
granted
->
{
}
else
if
(
permission
.
shouldShowRequestPermissionRationale
)
{
ToastUtil
.
toastShort
(
"Permission Success"
)
requestPermission
()
}
}
else
{
permission
.
shouldShowRequestPermissionRationale
->
{
ToastUtil
.
toastLong
(
requestPermission
()
this
,
}
getString
(
R
.
string
.
platform_need_storage_permission_hint
)
else
->
{
)
ToastUtil
.
toastLong
(
val
intent
=
Intent
(
Settings
.
ACTION_APPLICATION_DETAILS_SETTINGS
)
this
,
val
uri
=
Uri
.
fromParts
(
"package"
,
packageName
,
null
)
getString
(
R
.
string
.
platform_need_storage_permission_hint
)
intent
.
data
=
uri
)
startActivity
(
intent
)
val
intent
=
Intent
(
Settings
.
ACTION_APPLICATION_DETAILS_SETTINGS
)
finish
()
val
uri
=
Uri
.
fromParts
(
"package"
,
packageName
,
null
)
intent
.
data
=
uri
startActivity
(
intent
)
finish
()
}
}
}
}
}
...
@@ -267,11 +279,11 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -267,11 +279,11 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bindService
(
intent
,
serviceConnection
,
Context
.
BIND_AUTO_CREATE
)
bindService
(
intent
,
serviceConnection
,
Context
.
BIND_AUTO_CREATE
)
}
}
private
fun
bindMeditationService
(){
private
fun
bindMeditationService
()
{
val
intent
=
Intent
()
val
intent
=
Intent
()
intent
.
setClass
(
this
,
MeditationWindowService
::
class
.
java
)
intent
.
setClass
(
this
,
MeditationWindowService
::
class
.
java
)
meditationServiceConnection
=
MeditationServiceConnection
()
meditationServiceConnection
=
MeditationServiceConnection
()
bindService
(
intent
,
meditationServiceConnection
,
Context
.
BIND_AUTO_CREATE
)
bindService
(
intent
,
meditationServiceConnection
,
Context
.
BIND_AUTO_CREATE
)
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
...
@@ -281,6 +293,16 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -281,6 +293,16 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java)
// ModularServiceManager.provide(IConsultantService::class.java)
// .
// .
// (this)
// (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
()
{
override
fun
onPause
()
{
...
@@ -289,8 +311,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -289,8 +311,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
// ModularServiceManager.provide(IConsultantService::class.java).hideConsultAssistantDialog()
}
}
fun
onEvent
(
event
:
MeditationFloatEvent
)
{
fun
onEvent
(
event
:
MeditationFloatEvent
)
{
}
}
@SuppressLint
(
"MissingSuperCall"
)
@SuppressLint
(
"MissingSuperCall"
)
...
@@ -298,12 +320,12 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -298,12 +320,12 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
if
(
serviceConnection
!=
null
)
{
if
(
serviceConnection
!=
null
)
{
unbindService
(
serviceConnection
)
unbindService
(
serviceConnection
)
}
}
if
(
meditationServiceConnection
!=
null
)
{
if
(
meditationServiceConnection
!=
null
)
{
EventBus
.
getDefault
().
post
(
MeditationFloatEvent
(
false
))
EventBus
.
getDefault
().
post
(
MeditationFloatEvent
(
false
))
MediaPlayerManager
.
getInstance
(
this
)
?.
stop
()
MediaPlayerManager
.
getInstance
(
this
)
?.
stop
()
unbindService
(
meditationServiceConnection
)
unbindService
(
meditationServiceConnection
)
}
}
if
(
EventBus
.
getDefault
().
isRegistered
(
this
))
{
if
(
EventBus
.
getDefault
().
isRegistered
(
this
))
{
EventBus
.
getDefault
().
unregister
(
this
)
EventBus
.
getDefault
().
unregister
(
this
)
}
}
super
.
onDestroy
()
super
.
onDestroy
()
...
@@ -319,7 +341,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -319,7 +341,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
}
}
}
private
inner
class
MeditationServiceConnection
:
ServiceConnection
{
private
inner
class
MeditationServiceConnection
:
ServiceConnection
{
override
fun
onServiceConnected
(
name
:
ComponentName
?,
service
:
IBinder
?)
{
override
fun
onServiceConnected
(
name
:
ComponentName
?,
service
:
IBinder
?)
{
meditationService
=
(
service
as
MeditationWindowService
.
MeditationBinder
).
service
meditationService
=
(
service
as
MeditationWindowService
.
MeditationBinder
).
service
}
}
...
...
config.gradle
View file @
a0bfe19b
...
@@ -16,10 +16,7 @@ ext {
...
@@ -16,10 +16,7 @@ ext {
"m-muse"
:
"0.0.28.84"
,
"m-muse"
:
"0.0.28.84"
,
"m-tests"
:
"0.0.24.22"
,
"m-tests"
:
"0.0.24.22"
,
"m-course"
:
"0.0.43.39"
,
"m-course"
:
"0.0.43.39"
,
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
//mdt 组件
//mdt 组件
"ydl-tuicore"
:
"0.0.25"
,
"ydl-tuicore"
:
"0.0.25"
,
//第一步
//第一步
...
...
m-user/src/main/java/com/yidianling/user/mine/PersonalInfoActivity.java
View file @
a0bfe19b
...
@@ -406,6 +406,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
...
@@ -406,6 +406,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
@Override
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
resultCode
==
RESULT_OK
)
{
if
(
resultCode
==
RESULT_OK
)
{
switch
(
requestCode
)
{
switch
(
requestCode
)
{
case
21001
:
case
21001
:
...
@@ -432,6 +433,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
...
@@ -432,6 +433,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
case
21003
:
case
21003
:
if
(
imgUri
!=
null
)
{
if
(
imgUri
!=
null
)
{
showProgressDialog
(
"保存中..."
);
String
path
=
fileUtils
.
getPathByUri4kitkat
(
this
,
imgUri
);
String
path
=
fileUtils
.
getPathByUri4kitkat
(
this
,
imgUri
);
Bitmap
bitmap
=
BitmapFactory
.
decodeFile
(
path
);
Bitmap
bitmap
=
BitmapFactory
.
decodeFile
(
path
);
bitmap
=
fileUtils
.
getZoomImage
(
bitmap
,
200
);
bitmap
=
fileUtils
.
getZoomImage
(
bitmap
,
200
);
...
@@ -569,12 +571,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
...
@@ -569,12 +571,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
*/
*/
@SuppressLint
(
"CheckResult"
)
@SuppressLint
(
"CheckResult"
)
void
uploadImage
(
final
String
path
,
final
int
requestCode
)
{
void
uploadImage
(
final
String
path
,
final
int
requestCode
)
{
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
showProgressDialog
(
"保存中..."
);
}
});
UserHttp
userHttp
=
UserHttpImpl
.
Companion
.
getInstance
();
UserHttp
userHttp
=
UserHttpImpl
.
Companion
.
getInstance
();
userHttp
.
uploadHead
(
new
HeadParam
(
new
File
(
path
)))
userHttp
.
uploadHead
(
new
HeadParam
(
new
File
(
path
)))
...
@@ -610,6 +607,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
...
@@ -610,6 +607,7 @@ public class PersonalInfoActivity extends BaseActivity implements View.OnClickLi
.
transform
(
new
GlideCircleTransform
(
PersonalInfoActivity
.
this
))
.
transform
(
new
GlideCircleTransform
(
PersonalInfoActivity
.
this
))
.
into
(
persion_head_iv
);
.
into
(
persion_head_iv
);
}
}
dismissProgressDialog
();
},
new
ThrowableConsumer
()
{
},
new
ThrowableConsumer
()
{
@Override
@Override
public
void
accept
(
@NotNull
String
msg
)
{
public
void
accept
(
@NotNull
String
msg
)
{
...
...
m-user/src/main/java/com/yidianling/user/ui/login/OneKeyLoginHelp.kt
View file @
a0bfe19b
...
@@ -12,7 +12,6 @@ import android.view.View
...
@@ -12,7 +12,6 @@ import android.view.View
import
android.widget.ImageView
import
android.widget.ImageView
import
android.widget.RelativeLayout
import
android.widget.RelativeLayout
import
android.widget.TextView
import
android.widget.TextView
import
com.blankj.utilcode.util.ToastUtils
import
com.mobile.auth.gatewayauth.*
import
com.mobile.auth.gatewayauth.*
import
com.mobile.auth.gatewayauth.model.TokenRet
import
com.mobile.auth.gatewayauth.model.TokenRet
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.base.BaseActivity
...
@@ -131,10 +130,13 @@ object OneKeyLoginHelp {
...
@@ -131,10 +130,13 @@ object OneKeyLoginHelp {
*/
*/
private
fun
toLoginActivity
()
{
private
fun
toLoginActivity
()
{
if
(
mOpenPageIsSuccess
)
{
if
(
mOpenPageIsSuccess
)
{
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
true
,
isFromGuide
=
fals
e
)
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
true
,
isFromGuide
=
mIsFromGuid
e
)
}
else
{
}
else
{
RegisterAndLoginActivity
.
start
(
mActivity
,
false
,
mIsFromGuide
)
RegisterAndLoginActivity
.
start
(
mActivity
,
false
,
mIsFromGuide
)
}
}
if
(!
mIsFromGuide
)
{
quitLoginPage
()
}
}
}
/**
/**
...
@@ -150,7 +152,10 @@ object OneKeyLoginHelp {
...
@@ -150,7 +152,10 @@ object OneKeyLoginHelp {
if
(
mOpenPageIsSuccess
)
{
if
(
mOpenPageIsSuccess
)
{
RegisterAndLoginActivity
.
start
(
mActivity
)
RegisterAndLoginActivity
.
start
(
mActivity
)
}
else
{
}
else
{
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
false
,
isFromGuide
=
true
)
RegisterAndLoginActivity
.
start
(
mActivity
,
isFromOneKey
=
false
,
isFromGuide
=
!
isOpenDialog
)
}
if
(!
mIsFromGuide
)
{
quitLoginPage
()
}
}
}
}
}
}
...
@@ -630,7 +635,10 @@ object OneKeyLoginHelp {
...
@@ -630,7 +635,10 @@ object OneKeyLoginHelp {
if
(
mOpenPageIsSuccess
)
{
if
(
mOpenPageIsSuccess
)
{
RegisterAndLoginActivity
.
start
(
context
)
RegisterAndLoginActivity
.
start
(
context
)
}
else
{
}
else
{
RegisterAndLoginActivity
.
start
(
context
,
isFromOneKey
=
false
,
isFromGuide
=
true
)
RegisterAndLoginActivity
.
start
(
context
,
isFromOneKey
=
false
,
isFromGuide
=
!
isOpenDialog
)
}
if
(
isOpenDialog
)
{
quitLoginPage
()
}
}
}
}
}
}
...
...
m-user/src/main/java/com/yidianling/user/ui/login/RegisterAndLoginActivity.kt
View file @
a0bfe19b
...
@@ -113,7 +113,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
...
@@ -113,7 +113,6 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
intent
.
putExtra
(
IS_FROM_GUIDE
,
isFromGuide
)
intent
.
putExtra
(
IS_FROM_GUIDE
,
isFromGuide
)
context
.
startActivity
(
intent
)
context
.
startActivity
(
intent
)
}
}
/**
/**
* 注意:此方法仅限于启动页调用,其他页面不要调用此方法
* 注意:此方法仅限于启动页调用,其他页面不要调用此方法
*/
*/
...
@@ -723,7 +722,11 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
...
@@ -723,7 +722,11 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
super
.
onBackPressed
()
super
.
onBackPressed
()
}
}
}
else
{
}
else
{
OneKeyLoginHelp
.
checkEnvAvailable
(
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
if
(!
OneKeyLoginHelp
.
mIsFromGuide
)
{
finish
()
}
else
{
OneKeyLoginHelp
.
checkEnvAvailable
(
PhoneNumberAuthHelper
.
SERVICE_TYPE_LOGIN
)
}
super
.
onBackPressed
()
super
.
onBackPressed
()
}
}
}
else
{
}
else
{
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/trtccalling/model/TRTCCalling.java
View file @
a0bfe19b
...
@@ -117,7 +117,13 @@ public class TRTCCalling {
...
@@ -117,7 +117,13 @@ public class TRTCCalling {
* 是否正在接听界面
* 是否正在接听界面
*/
*/
public
boolean
mIsBeingInvited
=
false
;
public
boolean
mIsBeingInvited
=
false
;
private
String
mRoomId
=
"0"
;
/**
* 记录进入房间需要的一些信息(vivo,小米手机有后台弹出界面的权限,导致app后台状态下,消费掉通话邀请信令,再进入app无法打开通话邀请界面)
*/
public
String
mRoomId
=
""
;
public
String
mUserId
=
""
;
public
String
mInviteId
=
""
;
/**
/**
* 当前邀请列表
* 当前邀请列表
* C2C通话时会记录自己邀请的用户
* C2C通话时会记录自己邀请的用户
...
@@ -187,7 +193,7 @@ public class TRTCCalling {
...
@@ -187,7 +193,7 @@ public class TRTCCalling {
public
MdtCallBack
mdtCallBack
;
public
MdtCallBack
mdtCallBack
;
public
interface
MdtCallBack
{
public
interface
MdtCallBack
{
void
onReceiveNewInvitation
(
String
roomId
);
void
onReceiveNewInvitation
(
String
roomId
);
void
onInviteeAccepted
(
String
roomId
);
void
onInviteeAccepted
(
String
roomId
);
...
@@ -338,26 +344,26 @@ public class TRTCCalling {
...
@@ -338,26 +344,26 @@ public class TRTCCalling {
private
V2TIMSignalingListener
mTIMSignallingListener
=
new
V2TIMSignalingListener
()
{
private
V2TIMSignalingListener
mTIMSignallingListener
=
new
V2TIMSignalingListener
()
{
@Override
@Override
public
void
onReceiveNewInvitation
(
String
inviteID
,
String
inviter
,
String
groupID
,
List
<
String
>
inviteeList
,
String
data
)
{
public
void
onReceiveNewInvitation
(
String
inviteID
,
String
inviter
,
String
groupID
,
List
<
String
>
inviteeList
,
String
data
)
{
TRTCLogger
.
e
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
TRTCLogger
.
e
(
TAG
,
"onReceiveNewInvitation inviteID:"
+
inviteID
+
", inviter:"
+
inviter
+
", groupID:"
+
groupID
+
", inviteeList:"
+
inviteeList
+
" data:"
+
data
);
+
", groupID:"
+
groupID
+
", inviteeList:"
+
inviteeList
+
" data:"
+
data
);
mRoomId
=
groupID
;
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
for
(
String
s
:
inviteeList
)
{
if
(
inviteeList
.
contains
(
userModel
.
userId
))
{
if
(
s
.
equals
(
userModel
.
userId
)){
mRoomId
=
groupID
;
Intent
intent
=
new
Intent
(
mContext
,
YDLInvitionActivity
.
class
);
mUserId
=
userModel
.
userId
;
intent
.
putExtra
(
Constant
.
ROOM_ID
,
groupID
);
mInviteId
=
inviter
;
intent
.
putExtra
(
Constant
.
USER_ID
,
userModel
.
userId
);
intent
.
putExtra
(
Constant
.
INVITE_ID
,
inviter
);
Intent
intent
=
new
Intent
(
mContext
,
YDLInvitionActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
intent
.
putExtra
(
Constant
.
ROOM_ID
,
groupID
);
mContext
.
startActivity
(
intent
);
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
)
{
startRing
();
}
}
mdtCallBack
.
onReceiveNewInvitation
(
mRoomId
);
}
}
if
(!
mIsInRoom
){
startRing
();
}
mdtCallBack
.
onReceiveNewInvitation
(
mRoomId
);
}
}
@Override
@Override
...
@@ -1194,13 +1200,6 @@ public class TRTCCalling {
...
@@ -1194,13 +1200,6 @@ public class TRTCCalling {
return
;
return
;
}
}
final
UserModel
userModel
=
UserModelManager
.
getInstance
().
getUserModel
();
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);
}
}
/**
/**
...
@@ -2101,7 +2100,7 @@ public class TRTCCalling {
...
@@ -2101,7 +2100,7 @@ public class TRTCCalling {
if
(
TextUtils
.
isEmpty
(
mCallingBellPath
))
{
if
(
TextUtils
.
isEmpty
(
mCallingBellPath
))
{
mMediaPlayHelper
.
start
(
R
.
raw
.
phone_ringing
);
mMediaPlayHelper
.
start
(
R
.
raw
.
phone_ringing
);
}
else
{
}
else
{
if
(!
mMediaPlayHelper
.
getMediaPlayer
().
isPlaying
()){
if
(!
mMediaPlayHelper
.
getMediaPlayer
().
isPlaying
())
{
mMediaPlayHelper
.
start
(
mCallingBellPath
);
mMediaPlayHelper
.
start
(
mCallingBellPath
);
}
}
}
}
...
...
ydl-tuicore/src/main/java/com/tencent/qcloud/tuicore/calling/videocall/YDLInvitionActivity.java
View file @
a0bfe19b
...
@@ -59,10 +59,15 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
...
@@ -59,10 +59,15 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
MDTRxActivityTool
.
addActivity
(
this
);
MDTRxActivityTool
.
addActivity
(
this
);
handleIntent
();
handleIntent
();
setContentView
(
R
.
layout
.
video_invition_activity
);
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
());
EventBus
.
getDefault
().
post
(
new
ClearJPushEvent
());
initView
();
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