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
c8432b98
Commit
c8432b98
authored
Nov 22, 2019
by
konghaorui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充声网登录代码
parent
caec909a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
42 deletions
+33
-42
config.gradle
config.gradle
+5
-4
build.gradle
m-audioim/build.gradle
+2
-0
modular.gradle
m-audioim/modular.gradle
+1
-1
AudioImImpl.kt
m-audioim/src/main/java/com/ydl/audioim/AudioImImpl.kt
+5
-0
AudioImApi.kt
m-audioim/src/main/modular_api/com/ydl/audioim/api/AudioImApi.kt
+3
-1
FMDetailActivity.java
m-fm/src/main/java/com/yidianling/fm/FMDetailActivity.java
+5
-23
build.gradle
m-user/build.gradle
+2
-0
LoginUtils.kt
m-user/src/main/java/com/yidianling/user/LoginUtils.kt
+3
-13
UserIn.kt
m-user/src/main/java/com/yidianling/user/route/UserIn.kt
+7
-0
No files found.
config.gradle
View file @
c8432b98
...
@@ -45,13 +45,13 @@ ext {
...
@@ -45,13 +45,13 @@ ext {
"m-confide"
:
"0.0.22"
,
"m-confide"
:
"0.0.22"
,
"m-consultant"
:
"0.0.39"
,
"m-consultant"
:
"0.0.39"
,
"m-course"
:
"0.0.25"
,
"m-course"
:
"0.0.25"
,
"m-fm"
:
"0.0.
17
"
,
"m-fm"
:
"0.0.
20
"
,
"m-muse"
:
"0.0.14"
,
"m-muse"
:
"0.0.14"
,
"m-tests"
:
"0.0.11"
,
"m-tests"
:
"0.0.11"
,
"m-user"
:
"0.0.32"
,
"m-user"
:
"0.0.32"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.
1
"
,
"m-audioim-api"
:
"0.0.
2
"
,
"m-confide-api"
:
"0.0.1"
,
"m-confide-api"
:
"0.0.1"
,
"m-consultant-api"
:
"0.0.3"
,
"m-consultant-api"
:
"0.0.3"
,
"m-course-api"
:
"0.0.2"
,
"m-course-api"
:
"0.0.2"
,
...
@@ -67,7 +67,7 @@ ext {
...
@@ -67,7 +67,7 @@ ext {
"ydl-webview"
:
"0.0.27"
,
"ydl-webview"
:
"0.0.27"
,
"ydl-media"
:
"0.0.13"
,
"ydl-media"
:
"0.0.13"
,
"ydl-pay"
:
"0.0.10"
,
"ydl-pay"
:
"0.0.10"
,
"m-audioim"
:
"0.0.1
6
"
,
"m-audioim"
:
"0.0.1
8
"
,
//以下 几乎不会动
//以下 几乎不会动
"router"
:
"0.0.1"
,
"router"
:
"0.0.1"
,
"ydl-net"
:
"0.0.2"
,
"ydl-net"
:
"0.0.2"
,
...
@@ -86,7 +86,7 @@ ext {
...
@@ -86,7 +86,7 @@ ext {
"m-tests"
:
"0.0.4"
,
"m-tests"
:
"0.0.4"
,
"m-user"
:
"0.0.25"
,
"m-user"
:
"0.0.25"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.
1
"
,
"m-audioim-api"
:
"0.0.
2
"
,
"m-confide-api"
:
"0.0.1"
,
"m-confide-api"
:
"0.0.1"
,
"m-consultant-api"
:
"0.0.3"
,
"m-consultant-api"
:
"0.0.3"
,
"m-course-api"
:
"0.0.2"
,
"m-course-api"
:
"0.0.2"
,
...
@@ -261,6 +261,7 @@ ext {
...
@@ -261,6 +261,7 @@ ext {
"ydl-m-muse-api"
:
"com.ydl:m-muse-api:${ydlCompileVersion["
m
-
muse
-
api
"]}"
,
"ydl-m-muse-api"
:
"com.ydl:m-muse-api:${ydlCompileVersion["
m
-
muse
-
api
"]}"
,
"ydl-m-fm-api"
:
"com.ydl:m-fm-api:${ydlCompileVersion["
m
-
fm
-
api
"]}"
,
"ydl-m-fm-api"
:
"com.ydl:m-fm-api:${ydlCompileVersion["
m
-
fm
-
api
"]}"
,
"ydl-m-tests-api"
:
"com.ydl:m-tests-api:${ydlCompileVersion["
m
-
tests
-
api
"]}"
,
"ydl-m-tests-api"
:
"com.ydl:m-tests-api:${ydlCompileVersion["
m
-
tests
-
api
"]}"
,
"ydl-m-audioim-api"
:
"com.ydl:m-audioim-api:${ydlCompileVersion["
m
-
audioim
-
api
"]}"
,
]
]
}
}
m-audioim/build.gradle
View file @
c8432b98
...
@@ -77,8 +77,10 @@ dependencies {
...
@@ -77,8 +77,10 @@ dependencies {
//开发时使用
//开发时使用
api
project
(
':ydl-platform'
)
api
project
(
':ydl-platform'
)
api
project
(
':ydl-webview'
)
api
project
(
':ydl-webview'
)
implementation
modularPublication
(
'com.ydl:m-audioim-api'
)
}
else
{
}
else
{
//发布时使用
//发布时使用
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-audioim-api"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
transitive
=
true
transitive
=
true
...
...
m-audioim/modular.gradle
View file @
c8432b98
...
@@ -6,7 +6,7 @@ modular {
...
@@ -6,7 +6,7 @@ modular {
//发布信息 module/api 通用
//发布信息 module/api 通用
groupId
=
"com.ydl"
groupId
=
"com.ydl"
artifactId
=
"m-audioim-api"
artifactId
=
"m-audioim-api"
version
=
"0.0.1"
//version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
// API 层打包时需要引入的依赖
apiDependencies
{
apiDependencies
{
implementation
"com.google.code.gson:gson:2.8.2"
implementation
"com.google.code.gson:gson:2.8.2"
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioImImpl.kt
View file @
c8432b98
package
com.ydl.audioim
package
com.ydl.audioim
import
android.content.Context
import
com.ydl.audioim.api.AudioImApi
import
com.ydl.audioim.api.AudioImApi
/**
/**
...
@@ -7,6 +8,10 @@ import com.ydl.audioim.api.AudioImApi
...
@@ -7,6 +8,10 @@ import com.ydl.audioim.api.AudioImApi
*/
*/
class
AudioImImpl
:
AudioImApi
{
class
AudioImImpl
:
AudioImApi
{
override
fun
init
(
context
:
Context
?)
{
}
override
fun
loginAgora
(
userId
:
String
?)
{
override
fun
loginAgora
(
userId
:
String
?)
{
YDLavManager
.
instances
.
login
(
userId
)
YDLavManager
.
instances
.
login
(
userId
)
}
}
...
...
m-audioim/src/main/modular_api/com/ydl/audioim/api/AudioImApi.kt
View file @
c8432b98
package
com.ydl.audioim.api
package
com.ydl.audioim.api
import
com.alibaba.android.arouter.facade.template.IProvider
/**
/**
* 对外api接口
* 对外api接口
*/
*/
interface
AudioImApi
{
interface
AudioImApi
:
IProvider
{
/**
/**
* 登录声网Im
* 登录声网Im
...
...
m-fm/src/main/java/com/yidianling/fm/FMDetailActivity.java
View file @
c8432b98
...
@@ -26,7 +26,6 @@ import com.ydl.media.audio.AudioPlayer;
...
@@ -26,7 +26,6 @@ import com.ydl.media.audio.AudioPlayer;
import
com.ydl.media.audio.OnPlayerEventListener
;
import
com.ydl.media.audio.OnPlayerEventListener
;
import
com.ydl.media.audio.model.Music
;
import
com.ydl.media.audio.model.Music
;
import
com.ydl.media.view.PlayerFloatHelper
;
import
com.ydl.media.view.PlayerFloatHelper
;
import
com.ydl.media.view.PlayerFloatView
;
import
com.ydl.ydl_image.module.GlideApp
;
import
com.ydl.ydl_image.module.GlideApp
;
import
com.ydl.ydl_image.transform.GlideCircleRingTransform
;
import
com.ydl.ydl_image.transform.GlideCircleRingTransform
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.base.BaseActivity
;
...
@@ -62,7 +61,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
...
@@ -62,7 +61,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
* Created by softrice on 15/12/11.
* Created by softrice on 15/12/11.
*/
*/
@Route
(
path
=
"/fm/detail"
)
@Route
(
path
=
"/fm/detail"
)
public
class
FMDetailActivity
extends
BaseActivity
implements
View
.
OnClickListener
,
OnPlayerEventListener
,
PlayerFloatView
.
FloatViewPlayListener
{
public
class
FMDetailActivity
extends
BaseActivity
implements
View
.
OnClickListener
,
OnPlayerEventListener
{
int
id
;
int
id
;
boolean
isSplash
;
boolean
isSplash
;
...
@@ -227,7 +226,6 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
...
@@ -227,7 +226,6 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
init
();
init
();
initSurfaceView
();
initSurfaceView
();
initImg
();
initImg
();
PlayerFloatHelper
.
Companion
.
addClickListener
(
this
);
}
}
@SuppressLint
(
"WrongConstant"
)
@SuppressLint
(
"WrongConstant"
)
...
@@ -592,7 +590,6 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
...
@@ -592,7 +590,6 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
EventBus
.
getDefault
().
unregister
(
this
);
EventBus
.
getDefault
().
unregister
(
this
);
AudioPlayer
.
Companion
.
get
().
removeOnPlayEventListener
(
this
);
AudioPlayer
.
Companion
.
get
().
removeOnPlayEventListener
(
this
);
PlayerFloatHelper
.
Companion
.
removeClickListener
(
this
);
}
}
@Override
@Override
...
@@ -602,12 +599,14 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
...
@@ -602,12 +599,14 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override
@Override
public
void
onPlayerStart
()
{
public
void
onPlayerStart
()
{
iv_play
.
setImageResource
(
R
.
drawable
.
fm_stop_2
);
fmSurfaceView
.
playTimer
();
}
}
@Override
@Override
public
void
onPlayerPause
()
{
public
void
onPlayerPause
()
{
iv_play
.
setImageResource
(
R
.
drawable
.
fm_play_2
);
fmSurfaceView
.
stopTimer
();
}
}
@Override
@Override
...
@@ -640,21 +639,4 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
...
@@ -640,21 +639,4 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
updateAnimateStatus
();
updateAnimateStatus
();
getFMDetail
(
fmDetail
.
getNext_id
(),
true
);
getFMDetail
(
fmDetail
.
getNext_id
(),
true
);
}
}
@Override
public
void
onPauseClick
()
{
iv_play
.
setImageResource
(
R
.
drawable
.
fm_play_2
);
fmSurfaceView
.
stopTimer
();
}
@Override
public
void
onStartClick
()
{
iv_play
.
setImageResource
(
R
.
drawable
.
fm_stop_2
);
fmSurfaceView
.
playTimer
();
}
@Override
public
void
onPlayFinish
()
{
}
}
}
m-user/build.gradle
View file @
c8432b98
...
@@ -84,9 +84,11 @@ dependencies {
...
@@ -84,9 +84,11 @@ dependencies {
api
project
(
':ydl-webview'
)
api
project
(
':ydl-webview'
)
api
project
(
':ydl-platform'
)
api
project
(
':ydl-platform'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
implementation
modularPublication
(
'com.ydl:m-audioim-api'
)
}
else
{
}
else
{
//发布时使用
//发布时使用
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-audioim-api"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
transitive
=
true
transitive
=
true
...
...
m-user/src/main/java/com/yidianling/user/LoginUtils.kt
View file @
c8432b98
...
@@ -36,22 +36,12 @@ object LoginUtils {
...
@@ -36,22 +36,12 @@ object LoginUtils {
loginIm
(
userInfo
)
loginIm
(
userInfo
)
//设置极光注册id
//设置极光注册id
LoginHelper
.
setChannelId
()
LoginHelper
.
setChannelId
()
//设置声网登录
UserIn
.
getAvImApi
().
loginAgora
(
userInfo
?.
uid
)
val
loginEvent
=
UserLoginEvent
(
"login"
,
userInfo
?.
uid
!!
)
val
loginEvent
=
UserLoginEvent
(
"login"
,
userInfo
?.
uid
!!
)
EventBus
.
getDefault
().
post
(
loginEvent
)
EventBus
.
getDefault
().
post
(
loginEvent
)
BuryPointUtils
.
bindUid
(
userInfo
?.
uid
?:
""
)
BuryPointUtils
.
bindUid
(
userInfo
?.
uid
?:
""
)
// val channelId = JPushUtils.getRegistrationID()
// UserHttpImpl.getInstance().channelId(ChannelIdParam(channelId))
// .compose(RxUtils.resultData())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(Consumer {
// if (it["upload_log"] == "1") {
// LogHelper.getInstance().uploadLog(false)
// }
// }, object : ThrowableConsumer() {
// override fun accept(msg: String) {
// // ToastHelper.show(msg)
// }
// })
}
}
private
fun
loginIm
(
userInfo
:
UserResponseBean
?)
{
private
fun
loginIm
(
userInfo
:
UserResponseBean
?)
{
...
...
m-user/src/main/java/com/yidianling/user/route/UserIn.kt
View file @
c8432b98
...
@@ -3,6 +3,8 @@ package com.yidianling.user.route
...
@@ -3,6 +3,8 @@ package com.yidianling.user.route
import
android.app.Activity
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
com.ydl.audioim.api.AudioImApi
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.yidianling.router.RouterManager
import
com.yidianling.router.RouterManager
import
com.yidianling.router.im.IMLoginInfo
import
com.yidianling.router.im.IMLoginInfo
import
com.yidianling.router.im.IMRequestCallback
import
com.yidianling.router.im.IMRequestCallback
...
@@ -57,5 +59,9 @@ object UserIn {
...
@@ -57,5 +59,9 @@ object UserIn {
fun
clearImData
()
{
fun
clearImData
()
{
RouterManager
.
getImRouter
().
clear
()
RouterManager
.
getImRouter
().
clear
()
}
}
// 获取 声网 api
fun
getAvImApi
():
AudioImApi
{
return
ModularServiceManager
.
provide
(
AudioImApi
::
class
.
java
)
}
}
}
\ No newline at end of file
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