Commit b4b4e090 by 严久程

flutter路由地址修改

parents 8783a6c1 d013e07d
ext {
kotlin_version = "1.3.21"
dev_mode = true
dev_mode = false
ydl_app = [
appName : "心理咨询壹点灵",
......@@ -53,7 +53,7 @@ ext {
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
"m-audioim-api" : "0.0.2",
"m-confide-api" : "0.0.1",
"m-consultant-api": "0.0.3",
"m-course-api" : "0.0.2",
......@@ -70,7 +70,7 @@ ext {
"ydl-webview" : "0.0.27",
"ydl-media" : "0.0.13",
"ydl-pay" : "0.0.10",
"m-audioim" : "0.0.17",
"m-audioim" : "0.0.18",
//以下 几乎不会动
"router" : "0.0.1",
......@@ -90,7 +90,7 @@ ext {
"m-tests" : "0.0.4",
"m-user" : "0.0.25",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
"m-audioim-api" : "0.0.2",
"m-confide-api" : "0.0.1",
"m-consultant-api": "0.0.3",
"m-course-api" : "0.0.2",
......@@ -267,6 +267,7 @@ ext {
"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-tests-api" : "com.ydl:m-tests-api:${ydlCompileVersion["m-tests-api"]}",
"ydl-m-audioim-api" : "com.ydl:m-audioim-api:${ydlCompileVersion["m-audioim-api"]}",
]
}
......@@ -77,8 +77,10 @@ dependencies {
//开发时使用
api project(':ydl-platform')
api project(':ydl-webview')
implementation modularPublication('com.ydl:m-audioim-api')
}else {
//发布时使用
compileOnly rootProject.ext.dependencies["ydl-m-audioim-api"]
api rootProject.ext.dependencies["ydl-webview"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
......
......@@ -6,7 +6,7 @@ modular {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-audioim-api"
version = "0.0.1"
//version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
package com.ydl.audioim
import android.content.Context
import com.ydl.audioim.api.AudioImApi
/**
......@@ -7,6 +8,10 @@ import com.ydl.audioim.api.AudioImApi
*/
class AudioImImpl: AudioImApi {
override fun init(context: Context?) {
}
override fun loginAgora(userId: String?) {
YDLavManager.instances.login(userId)
}
......
package com.ydl.audioim.api
import com.alibaba.android.arouter.facade.template.IProvider
/**
* 对外api接口
*/
interface AudioImApi {
interface AudioImApi : IProvider {
/**
* 登录声网Im
......
......@@ -26,7 +26,6 @@ import com.ydl.media.audio.AudioPlayer;
import com.ydl.media.audio.OnPlayerEventListener;
import com.ydl.media.audio.model.Music;
import com.ydl.media.view.PlayerFloatHelper;
import com.ydl.media.view.PlayerFloatView;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydl_image.transform.GlideCircleRingTransform;
import com.ydl.ydlcommon.base.BaseActivity;
......@@ -62,7 +61,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
* Created by softrice on 15/12/11.
*/
@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;
boolean isSplash;
......@@ -227,7 +226,6 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
init();
initSurfaceView();
initImg();
PlayerFloatHelper.Companion.addClickListener(this);
}
@SuppressLint("WrongConstant")
......@@ -592,7 +590,6 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
EventBus.getDefault().unregister(this);
AudioPlayer.Companion.get().removeOnPlayEventListener(this);
PlayerFloatHelper.Companion.removeClickListener(this);
}
@Override
......@@ -602,12 +599,14 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override
public void onPlayerStart() {
iv_play.setImageResource(R.drawable.fm_stop_2);
fmSurfaceView.playTimer();
}
@Override
public void onPlayerPause() {
iv_play.setImageResource(R.drawable.fm_play_2);
fmSurfaceView.stopTimer();
}
@Override
......@@ -640,21 +639,4 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
updateAnimateStatus();
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() {
}
}
......@@ -84,9 +84,11 @@ dependencies {
api project(':ydl-webview')
api project(':ydl-platform')
implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-audioim-api')
}else {
//发布时使用
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-platform"]) {
transitive = true
......
......@@ -36,22 +36,12 @@ object LoginUtils {
loginIm(userInfo)
//设置极光注册id
LoginHelper.setChannelId()
//设置声网登录
UserIn.getAvImApi().loginAgora(userInfo?.uid)
val loginEvent = UserLoginEvent("login", userInfo?.uid!!)
EventBus.getDefault().post(loginEvent)
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?) {
......
......@@ -3,6 +3,8 @@ package com.yidianling.user.route
import android.app.Activity
import android.content.Context
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.im.IMLoginInfo
import com.yidianling.router.im.IMRequestCallback
......@@ -57,5 +59,9 @@ object UserIn {
fun clearImData() {
RouterManager.getImRouter().clear()
}
// 获取 声网 api
fun getAvImApi(): AudioImApi{
return ModularServiceManager.provide(AudioImApi::class.java)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment