Commit b56ae21b by 徐健

Merge branch 'feature/v3' of…

Merge branch 'feature/v3' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into feature/v3
parents c4319528 a28b8a0e
...@@ -20,9 +20,6 @@ class DemoModel : BaseModel(), DemoContract.Model { ...@@ -20,9 +20,6 @@ class DemoModel : BaseModel(), DemoContract.Model {
return YDLHttpUtils.obtainApi(DemoService::class.java) return YDLHttpUtils.obtainApi(DemoService::class.java)
.getFMData() .getFMData()
.compose(RxUtils.resultJavaData()) .compose(RxUtils.resultJavaData())
.map {
throw RuntimeException("runtime exception")
}
} }
override fun getHome(): Observable<JsonObject> { override fun getHome(): Observable<JsonObject> {
......
...@@ -26,7 +26,7 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(), ...@@ -26,7 +26,7 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(),
} }
override fun onSuccess(homeFMBean: HomeFMBean) { override fun onSuccess(homeFMBean: HomeFMBean) {
throw RuntimeException("runtime exception") // throw RuntimeException("runtime exception")
homeFMBean.list?.let { homeFMBean.list?.let {
AudioPlayer.get().addPlayList(stringToMusicPlayerList(it)) AudioPlayer.get().addPlayList(stringToMusicPlayerList(it))
mView.setData("") mView.setData("")
......
...@@ -102,8 +102,8 @@ public interface NetApiStore { ...@@ -102,8 +102,8 @@ public interface NetApiStore {
Observable<BaseResponse<Object>> reportWorry(@FieldMap Map<String, String> params); Observable<BaseResponse<Object>> reportWorry(@FieldMap Map<String, String> params);
//发布动态 //发布动态
@Multipart
@POST("sq-active/publish") @POST("sq-active/publish")
@Multipart
Observable<BaseResponse<PublishTrendResult>> publishTrend(@PartMap Map<String, RequestBody> params); Observable<BaseResponse<PublishTrendResult>> publishTrend(@PartMap Map<String, RequestBody> params);
//话题列表 //话题列表
......
...@@ -84,10 +84,10 @@ dependencies { ...@@ -84,10 +84,10 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2' kapt 'com.alibaba:arouter-compiler:1.2.2'
api 'com.ydl:nim-base:1.0.1' api 'com.ydl:nim-base:1.0.4'
api 'com.netease.nimlib:basesdk:6.4.0' api 'com.netease.nimlib:basesdk:7.0.3'
api 'com.netease.nimlib:avchat:6.4.0' api 'com.netease.nimlib:avchat:7.0.3'
api 'com.netease.nimlib:nrtc:6.4.0' api 'com.netease.nimlib:nrtc:7.0.3'
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
......
...@@ -5,6 +5,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatAudioFrame; ...@@ -5,6 +5,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatAudioFrame;
import com.netease.nimlib.sdk.avchat.model.AVChatNetworkStats; import com.netease.nimlib.sdk.avchat.model.AVChatNetworkStats;
import com.netease.nimlib.sdk.avchat.model.AVChatSessionStats; import com.netease.nimlib.sdk.avchat.model.AVChatSessionStats;
import com.netease.nimlib.sdk.avchat.model.AVChatVideoFrame; import com.netease.nimlib.sdk.avchat.model.AVChatVideoFrame;
import com.netease.nrtc.sdk.common.VideoFilterParameter;
import com.netease.nrtc.sdk.video.VideoFrame;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -20,6 +22,16 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver { ...@@ -20,6 +22,16 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver {
} }
@Override @Override
public void onAVRecordingStart(String account, String fileDir) {
}
@Override
public void onAudioRecordingStart(String fileDir) {
}
@Override
public void onAVRecordingCompletion(String account, String filePath) { public void onAVRecordingCompletion(String account, String filePath) {
} }
...@@ -55,6 +67,46 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver { ...@@ -55,6 +67,46 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver {
} }
@Override @Override
public void onPublishVideoResult(int result) {
}
@Override
public void onUnpublishVideoResult(int result) {
}
@Override
public void onSubscribeVideoResult(String account, int videoType, int result) {
}
@Override
public void onUnsubscribeVideoResult(String account, int videoType, int result) {
}
@Override
public void onRemotePublishVideo(String account, int[] videoTypes) {
}
@Override
public void onRemoteUnpublishVideo(String account) {
}
@Override
public void onUnsubscribeAudioResult(int result) {
}
@Override
public void onSubscribeAudioResult(int result) {
}
@Override
public void onJoinedChannel(int code, String audioFile, String videoFile, int elapsed) { public void onJoinedChannel(int code, String audioFile, String videoFile, int elapsed) {
} }
...@@ -130,6 +182,11 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver { ...@@ -130,6 +182,11 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver {
} }
@Override @Override
public boolean onVideoFrameFilter(VideoFrame input, VideoFrame[] outputFrames, VideoFilterParameter filterParameter) {
return false;
}
@Override
public boolean onAudioFrameFilter(AVChatAudioFrame frame) { public boolean onAudioFrameFilter(AVChatAudioFrame frame) {
return false; return false;
} }
......
...@@ -5,6 +5,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatAudioFrame; ...@@ -5,6 +5,8 @@ import com.netease.nimlib.sdk.avchat.model.AVChatAudioFrame;
import com.netease.nimlib.sdk.avchat.model.AVChatNetworkStats; import com.netease.nimlib.sdk.avchat.model.AVChatNetworkStats;
import com.netease.nimlib.sdk.avchat.model.AVChatSessionStats; import com.netease.nimlib.sdk.avchat.model.AVChatSessionStats;
import com.netease.nimlib.sdk.avchat.model.AVChatVideoFrame; import com.netease.nimlib.sdk.avchat.model.AVChatVideoFrame;
import com.netease.nrtc.sdk.common.VideoFilterParameter;
import com.netease.nrtc.sdk.video.VideoFrame;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -20,6 +22,16 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver { ...@@ -20,6 +22,16 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver {
} }
@Override @Override
public void onAVRecordingStart(String account, String fileDir) {
}
@Override
public void onAudioRecordingStart(String fileDir) {
}
@Override
public void onConnectionTypeChanged(int netType) { public void onConnectionTypeChanged(int netType) {
} }
...@@ -60,6 +72,46 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver { ...@@ -60,6 +72,46 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver {
} }
@Override @Override
public void onPublishVideoResult(int result) {
}
@Override
public void onUnpublishVideoResult(int result) {
}
@Override
public void onSubscribeVideoResult(String account, int videoType, int result) {
}
@Override
public void onUnsubscribeVideoResult(String account, int videoType, int result) {
}
@Override
public void onRemotePublishVideo(String account, int[] videoTypes) {
}
@Override
public void onRemoteUnpublishVideo(String account) {
}
@Override
public void onUnsubscribeAudioResult(int result) {
}
@Override
public void onSubscribeAudioResult(int result) {
}
@Override
public void onFirstVideoFrameAvailable(String account) { public void onFirstVideoFrameAvailable(String account) {
} }
...@@ -131,6 +183,11 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver { ...@@ -131,6 +183,11 @@ public class SimpleAVChatStateObserver implements AVChatStateObserver {
} }
@Override @Override
public boolean onVideoFrameFilter(VideoFrame input, VideoFrame[] outputFrames, VideoFilterParameter filterParameter) {
return false;
}
@Override
public boolean onAudioFrameFilter(AVChatAudioFrame frame) { public boolean onAudioFrameFilter(AVChatAudioFrame frame) {
return false; return false;
} }
......
...@@ -17,7 +17,6 @@ import com.yidianling.im.R; ...@@ -17,7 +17,6 @@ import com.yidianling.im.R;
import com.yidianling.im.config.constants.UserPreferences; import com.yidianling.im.config.constants.UserPreferences;
import com.yidianling.im.config.provider.CustomUserInfoProvider; import com.yidianling.im.config.provider.CustomUserInfoProvider;
import com.yidianling.im.preference.IMCache; import com.yidianling.im.preference.IMCache;
import com.yidianling.uikit.api.NimUIKitImpl;
import com.yidianling.uikit.api.wrapper.MessageRevokeTip; import com.yidianling.uikit.api.wrapper.MessageRevokeTip;
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderThumbBase; import com.yidianling.uikit.business.session.viewholder.MsgViewHolderThumbBase;
...@@ -198,14 +197,37 @@ class NimSDKOptionConfig { ...@@ -198,14 +197,37 @@ class NimSDKOptionConfig {
// 第三方推送配置 // 第三方推送配置
MixPushConfig config = new MixPushConfig(); MixPushConfig config = new MixPushConfig();
String appFrom = BaseApp.Companion.getInstance().getGlobalConfig().getAppFrom();
// 小米推送
config.xmAppId = "2882303761517432980"; if (YDLConstants.FROM_YDL.equals(appFrom)) {
config.xmAppKey = "5241743243980"; // 小米推送
config.xmCertificateName = "ydlUser"; config.xmAppId = "2882303761517432980";
config.xmAppKey = "5241743243980";
// 华为推送 config.xmCertificateName = "ydlUser";
config.hwCertificateName = "ydlUserHw"; // 华为推送
config.hwCertificateName = "ydlUserHw";
//OPPO 推送
config.oppoAppId = "3245516";
config.oppoAppKey = "afk71f35VogGw0w0wKsookksc";
config.oppoAppSercet = "691184F044acA7a6851F578451f67616";
config.oppoCertificateName = "ydlUserOPPO";
//VIVO 推送
config.vivoCertificateName = "ydlUserVIVO";
}else if(YDLConstants.FROM_XLZX.equals(appFrom)) {
// 小米推送
config.xmAppId = "2882303761517549919";
config.xmAppKey = "5111754949919";
config.xmCertificateName = "ydlXLZXXM";
// 华为推送
config.hwCertificateName = "ydlXLZX";
//OPPO 推送
config.oppoAppId = "3601521";
config.oppoAppKey = "c500cJ5mzvSow848048gOsG4G";
config.oppoAppSercet = "F13EbCf4380b683Fb0e316336eeC9Deb";
config.oppoCertificateName = "ydlXLZXOPPO";
//VIVO 推送
config.vivoCertificateName = "ydlXLZXVIVO";
}
return config; return config;
} }
......
...@@ -190,10 +190,12 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -190,10 +190,12 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
protected YDLMessageFragment fragment() { protected YDLMessageFragment fragment() {
Bundle arguments = getIntent().getExtras(); Bundle arguments = getIntent().getExtras();
arguments.putSerializable(Extras.EXTRA_TYPE, SessionTypeEnum.P2P); arguments.putSerializable(Extras.EXTRA_TYPE, SessionTypeEnum.P2P);
YDLMessageFragment fragment = new YDLMessageFragment(); if (messageFragment==null){
fragment.setArguments(arguments); messageFragment = new YDLMessageFragment();
fragment.setContainerId(R.id.message_fragment_container); messageFragment.setArguments(arguments);
return fragment; messageFragment.setContainerId(R.id.message_fragment_container);
}
return messageFragment;
} }
@Override @Override
......
...@@ -182,7 +182,7 @@ public class TeamNotificationHelper { ...@@ -182,7 +182,7 @@ public class TeamNotificationHelper {
} }
} else if (field.getKey() == TeamFieldEnum.Extension) { } else if (field.getKey() == TeamFieldEnum.Extension) {
sb.append("群扩展字段被更新为 " + field.getValue()); sb.append("群扩展字段被更新为 " + field.getValue());
} else if (field.getKey() == TeamFieldEnum.Ext_Server) { } else if (field.getKey() == TeamFieldEnum.Ext_Server_Only) {
sb.append("群扩展字段(服务器)被更新为 " + field.getValue()); sb.append("群扩展字段(服务器)被更新为 " + field.getValue());
} else if (field.getKey() == TeamFieldEnum.ICON) { } else if (field.getKey() == TeamFieldEnum.ICON) {
sb.append("群头像已更新"); sb.append("群头像已更新");
......
...@@ -9,6 +9,7 @@ import com.ydl.devicesidlib.DeviceIDHelper ...@@ -9,6 +9,7 @@ import com.ydl.devicesidlib.DeviceIDHelper
import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader import com.ydl.ydlcommon.actions.imagepicker.YdlImageLoader
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.UpLoadLogUtils import com.ydl.ydlcommon.data.http.UpLoadLogUtils
import com.ydl.ydlcommon.utils.AppProgressUtils
import com.ydl.ydlcommon.utils.BuryPointUtils import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
...@@ -28,7 +29,9 @@ object YdlRepository { ...@@ -28,7 +29,9 @@ object YdlRepository {
// 需要在主 module 的 application 的 onCreate 方法中调用此方法 // 需要在主 module 的 application 的 onCreate 方法中调用此方法
fun initApp(app: Application,isDebug:Boolean) { fun initApp(app: Application,isDebug:Boolean) {
DeviceIDHelper.getInstance().init(app.applicationContext) if (AppProgressUtils.isMainProcess(app)){
DeviceIDHelper.getInstance().init(app.applicationContext)
}
LogHelper.getInstance().deleteExpireLogSync() LogHelper.getInstance().deleteExpireLogSync()
LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug com.yidianling.common.tools.LogUtil.debug = BaseApp.instance.getGlobalConfig().appDebug
......
...@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.app.YdlRepository ...@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.app.YdlRepository
import com.ydl.ydlcommon.base.config.GlobalConfig import com.ydl.ydlcommon.base.config.GlobalConfig
import com.ydl.ydlcommon.base.config.IApp import com.ydl.ydlcommon.base.config.IApp
import com.ydl.ydlcommon.base.config.IConfigModule import com.ydl.ydlcommon.base.config.IConfigModule
import com.ydl.ydlcommon.utils.AppProgressUtils
import com.ydl.ydlcommon.utils.ManifestParser import com.ydl.ydlcommon.utils.ManifestParser
import java.util.* import java.util.*
...@@ -45,9 +46,12 @@ class AppDelegate(context: Context) : IAppLifecycles,IApp{ ...@@ -45,9 +46,12 @@ class AppDelegate(context: Context) : IAppLifecycles,IApp{
this.mApplication = application this.mApplication = application
mGlobalConfig = initModuleConfig(application, mModules!!) mGlobalConfig = initModuleConfig(application, mModules!!)
mGlobalConfig!!.initEnv() mGlobalConfig!!.initEnv()
//初始化YDL第三方依赖 //初始化YDL第三方依赖
YdlRepository.initApp(application,mGlobalConfig?.appDebug?:false) YdlRepository.initApp(application,mGlobalConfig?.appDebug?:false)
//执行 扩展的 App onCreate 逻辑 //执行 扩展的 App onCreate 逻辑
for (lifecycle in mAppLifecycles!!) { for (lifecycle in mAppLifecycles!!) {
lifecycle.onCreate(mApplication!!) lifecycle.onCreate(mApplication!!)
......
...@@ -51,6 +51,8 @@ dependencies { ...@@ -51,6 +51,8 @@ dependencies {
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
api fileTree(dir: 'libs', include: ['*.jar']) api fileTree(dir: 'libs', include: ['*.jar'])
api 'com.tencent.tbs.tbssdk:sdk:43697'
if (rootProject.ext.dev_mode){ if (rootProject.ext.dev_mode){
//开发时使用 //开发时使用
api project(':ydl-platform') api project(':ydl-platform')
......
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