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
d690bbf2
Commit
d690bbf2
authored
Nov 22, 2019
by
洪国微
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4b2e2b1a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
8 deletions
+25
-8
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-0
network_config.xml
app/src/main/res/xml/network_config.xml
+5
-0
config.gradle
config.gradle
+4
-4
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+9
-1
AudioApiRequestUtil.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
+3
-2
AudioNetAPi.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
+3
-1
No files found.
app/src/main/AndroidManifest.xml
View file @
d690bbf2
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:networkSecurityConfig=
"@xml/network_config"
android:theme=
"@style/platform_CommonTheme"
android:theme=
"@style/platform_CommonTheme"
tools:ignore=
"GoogleAppIndexingWarning"
tools:ignore=
"GoogleAppIndexingWarning"
tools:replace=
"android:allowBackup, android:icon, android:label"
>
tools:replace=
"android:allowBackup, android:icon, android:label"
>
...
...
app/src/main/res/xml/network_config.xml
0 → 100644
View file @
d690bbf2
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config
cleartextTrafficPermitted=
"true"
/>
</network-security-config>
\ No newline at end of file
config.gradle
View file @
d690bbf2
...
@@ -42,7 +42,7 @@ ext {
...
@@ -42,7 +42,7 @@ ext {
ydlPublishVersion
=
[
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.2
1
"
,
"m-confide"
:
"0.0.2
4
"
,
"m-consultant"
:
"0.0.38"
,
"m-consultant"
:
"0.0.38"
,
"m-course"
:
"0.0.17"
,
"m-course"
:
"0.0.17"
,
"m-fm"
:
"0.0.15"
,
"m-fm"
:
"0.0.15"
,
...
@@ -67,7 +67,7 @@ ext {
...
@@ -67,7 +67,7 @@ ext {
"ydl-webview"
:
"0.0.26"
,
"ydl-webview"
:
"0.0.26"
,
"ydl-media"
:
"0.0.12"
,
"ydl-media"
:
"0.0.12"
,
"ydl-pay"
:
"0.0.9"
,
"ydl-pay"
:
"0.0.9"
,
"m-audioim"
:
"0.0.1
5
"
,
"m-audioim"
:
"0.0.1
7
"
,
//以下 几乎不会动
//以下 几乎不会动
"router"
:
"0.0.1"
,
"router"
:
"0.0.1"
,
"ydl-net"
:
"0.0.2"
,
"ydl-net"
:
"0.0.2"
,
...
@@ -78,7 +78,7 @@ ext {
...
@@ -78,7 +78,7 @@ ext {
ydlCompileVersion
=
[
ydlCompileVersion
=
[
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.
15
"
,
"m-confide"
:
"0.0.
23
"
,
"m-consultant"
:
"0.0.26"
,
"m-consultant"
:
"0.0.26"
,
"m-course"
:
"0.0.22"
,
"m-course"
:
"0.0.22"
,
"m-fm"
:
"0.0.15"
,
"m-fm"
:
"0.0.15"
,
...
@@ -102,7 +102,7 @@ ext {
...
@@ -102,7 +102,7 @@ ext {
"ydl-webview"
:
"0.0.24"
,
"ydl-webview"
:
"0.0.24"
,
"ydl-media"
:
"0.0.12"
,
"ydl-media"
:
"0.0.12"
,
"ydl-pay"
:
"0.0.9"
,
"ydl-pay"
:
"0.0.9"
,
"m-audioim"
:
"0.0.1
5
"
,
"m-audioim"
:
"0.0.1
7
"
,
//以下 几乎不会动
//以下 几乎不会动
"router"
:
"0.0.1"
,
"router"
:
"0.0.1"
,
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
d690bbf2
package
com.ydl.audioim
package
com.ydl.audioim
import
android.annotation.SuppressLint
import
android.content.Context
import
android.content.Context
import
android.text.TextUtils
import
com.ydl.ydl_av.messge_service.YDLRTMClient
import
com.ydl.ydl_av.messge_service.YDLRTMClient
import
com.ydl.ydl_av.messge_service.bean.RTMMesssage
import
com.ydl.ydl_av.messge_service.bean.RTMMesssage
import
com.ydl.ydl_av.messge_service.callback.InitListener
import
com.ydl.ydl_av.messge_service.callback.InitListener
...
@@ -32,10 +34,16 @@ class YDLavManager {
...
@@ -32,10 +34,16 @@ class YDLavManager {
YDLRTMClient
.
instances
.
init
(
context
,
appId
,
listener
)
YDLRTMClient
.
instances
.
init
(
context
,
appId
,
listener
)
}
}
@SuppressLint
(
"CheckResult"
)
fun
login
(
userId
:
String
?){
fun
login
(
userId
:
String
?){
if
(
TextUtils
.
isEmpty
(
userId
)
||
userId
?:
"0"
<=
"0"
){
//如果uid为空或小于等于0 ,则不进行登录,因为uid为0也会登录成功,会导致后面uid正确时无法登录
LogUtil
.
e
(
"[agora]login-uid:$userId"
)
return
}
//登录实时消息
//登录实时消息
//获取token
//获取token
AudioApiRequestUtil
.
getAgoraToken
(
userId
)
AudioApiRequestUtil
.
getAgoraToken
()
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
({
.
subscribe
({
...
...
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
View file @
d690bbf2
...
@@ -73,8 +73,8 @@ class AudioApiRequestUtil {
...
@@ -73,8 +73,8 @@ class AudioApiRequestUtil {
/**
/**
* 获取声网登录token
* 获取声网登录token
*/
*/
fun
getAgoraToken
(
uid
:
String
?
):
Observable
<
BaseAPIResponse
<
AgoraTokenResponse
>>{
fun
getAgoraToken
():
Observable
<
BaseAPIResponse
<
AgoraTokenResponse
>>{
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
getAgoraToken
(
uid
)
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
getAgoraToken
()
}
}
}
}
}
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
View file @
d690bbf2
...
@@ -51,5 +51,6 @@ interface AudioNetAPi {
...
@@ -51,5 +51,6 @@ interface AudioNetAPi {
*/
*/
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"im/getAgoraToken"
)
@GET
(
"im/getAgoraToken"
)
fun
getAgoraToken
(
@Query
(
"uid"
)
uid
:
String
?):
Observable
<
BaseAPIResponse
<
AgoraTokenResponse
>>
fun
getAgoraToken
():
Observable
<
BaseAPIResponse
<
AgoraTokenResponse
>>
}
}
\ 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