同步PD修复内容:
fix[修復小窗播放白屏問題] 潘多拉: 调整回融云拦截声音&震动 消息通知调用声音&震动
This commit is contained in:
parent
65b045ca61
commit
0ff76e1e47
@ -58,6 +58,7 @@ import com.yunbao.common.utils.GoogleUtils;
|
|||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MessageChatNotifyManager;
|
import com.yunbao.common.utils.MessageChatNotifyManager;
|
||||||
import com.yunbao.common.utils.MessageSayHiNotifyManager;
|
import com.yunbao.common.utils.MessageSayHiNotifyManager;
|
||||||
|
import com.yunbao.common.utils.SoundUtils;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
@ -369,6 +370,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
if (message.getReceivedStatus().isRead()) {
|
if (message.getReceivedStatus().isRead()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
SoundUtils.playNotificationSound(AppManager.getInstance().getMainActivity());
|
||||||
RongIMClient.getInstance().getUnreadCount(Conversation.ConversationType.PRIVATE, message.getTargetId(), new RongIMClient.ResultCallback<Integer>() {
|
RongIMClient.getInstance().getUnreadCount(Conversation.ConversationType.PRIVATE, message.getTargetId(), new RongIMClient.ResultCallback<Integer>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Integer integer) {
|
public void onSuccess(Integer integer) {
|
||||||
|
@ -26,6 +26,7 @@ import com.yunbao.common.custom.RatioRoundImageView;
|
|||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.SoundUtils;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.ViewUtils;
|
import com.yunbao.common.utils.ViewUtils;
|
||||||
@ -128,7 +129,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
showTag();
|
showTag();
|
||||||
playNotificationSound();
|
SoundUtils.playNotificationSound(mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showTag() {
|
private void showTag() {
|
||||||
@ -182,21 +183,5 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void playNotificationSound() {
|
|
||||||
try {
|
|
||||||
|
|
||||||
Uri ringUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
|
||||||
MediaPlayer mMediaPlayer = new MediaPlayer();
|
|
||||||
mMediaPlayer.setDataSource(mContext, ringUri);
|
|
||||||
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);
|
|
||||||
mMediaPlayer.setLooping(false);
|
|
||||||
mMediaPlayer.prepare();
|
|
||||||
mMediaPlayer.start();
|
|
||||||
|
|
||||||
Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
|
|
||||||
vibrator.vibrate(new long[]{150, 250, 150, 250}, -1);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
28
common/src/main/java/com/yunbao/common/utils/SoundUtils.java
Normal file
28
common/src/main/java/com/yunbao/common/utils/SoundUtils.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package com.yunbao.common.utils;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.media.AudioManager;
|
||||||
|
import android.media.MediaPlayer;
|
||||||
|
import android.media.RingtoneManager;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Vibrator;
|
||||||
|
|
||||||
|
public class SoundUtils {
|
||||||
|
public static void playNotificationSound(Context mContext) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
Uri ringUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
||||||
|
MediaPlayer mMediaPlayer = new MediaPlayer();
|
||||||
|
mMediaPlayer.setDataSource(mContext, ringUri);
|
||||||
|
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_NOTIFICATION);
|
||||||
|
mMediaPlayer.setLooping(false);
|
||||||
|
mMediaPlayer.prepare();
|
||||||
|
mMediaPlayer.start();
|
||||||
|
|
||||||
|
Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
|
||||||
|
vibrator.vibrate(new long[]{150, 250, 150, 250}, -1);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,8 +4,8 @@ ext {
|
|||||||
buildToolsVersion: "29.0.2",
|
buildToolsVersion: "29.0.2",
|
||||||
minSdkVersion : 23,
|
minSdkVersion : 23,
|
||||||
targetSdkVersion : 33,
|
targetSdkVersion : 33,
|
||||||
versionCode : 529,
|
versionCode : 531,
|
||||||
versionName : "6.7.0",
|
versionName : "6.7.1",
|
||||||
namespace : "com.pandoralive.shayu"
|
namespace : "com.pandoralive.shayu"
|
||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
@ -26,7 +26,7 @@ ext {
|
|||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
// isGooglePlay : false,
|
// isGooglePlay : false,
|
||||||
// true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包
|
// true表示谷歌支付 false 0 链接包(isPluginModel-> true) 1 谷歌包 2华为包 3 samsung包
|
||||||
isGooglePlay : 0,
|
isGooglePlay : 1,
|
||||||
|
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
isUploadLog : true,
|
isUploadLog : true,
|
||||||
|
@ -19,6 +19,7 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lzf.easyfloat.EasyFloat;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
@ -56,6 +57,7 @@ import com.yunbao.common.utils.ToastUtil;
|
|||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
||||||
import com.yunbao.common.views.TopGradual;
|
import com.yunbao.common.views.TopGradual;
|
||||||
|
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||||
|
|
||||||
@ -102,6 +104,9 @@ public class SudRyGameActivity extends AbsActivity implements GameRyMicManager.M
|
|||||||
Bus.getOn(this);
|
Bus.getOn(this);
|
||||||
super.main();
|
super.main();
|
||||||
initView();
|
initView();
|
||||||
|
//进游戏房就关掉小窗
|
||||||
|
EasyFloat.dismiss("LiveFloatView", true);
|
||||||
|
APPEasyFloat.getInstance().dismiss(mContext);
|
||||||
initDate();
|
initDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ import com.yunbao.common.utils.ToastUtil;
|
|||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
import com.yunbao.common.views.LiveSudGameHistoryPopup;
|
||||||
import com.yunbao.common.views.TopGradual;
|
import com.yunbao.common.views.TopGradual;
|
||||||
|
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||||
|
|
||||||
@ -110,6 +111,9 @@ public class SudSwGameActivity extends AbsActivity implements GameSwMicManager.M
|
|||||||
Bus.getOn(this);
|
Bus.getOn(this);
|
||||||
super.main();
|
super.main();
|
||||||
initView();
|
initView();
|
||||||
|
//进游戏房就关掉小窗
|
||||||
|
EasyFloat.dismiss("LiveFloatView", true);
|
||||||
|
APPEasyFloat.getInstance().dismiss(mContext);
|
||||||
initDate();
|
initDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,8 +137,6 @@ public class SudSwGameActivity extends AbsActivity implements GameSwMicManager.M
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//进游戏房就关掉小窗
|
|
||||||
EasyFloat.dismiss("LiveFloatView", true);
|
|
||||||
|
|
||||||
// 设置禁用麦克风采集
|
// 设置禁用麦克风采集
|
||||||
//RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
//RCRTCEngine.getInstance().getDefaultAudioStream().setMicrophoneDisable(disable);
|
||||||
|
@ -630,6 +630,9 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
mEnd = true;
|
mEnd = true;
|
||||||
mStarted = false;
|
mStarted = false;
|
||||||
Bus.getOff(this);
|
Bus.getOff(this);
|
||||||
|
if(ry_view!=null){
|
||||||
|
ry_view.removeAllViews();
|
||||||
|
}
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
//swAuManager.exitChannelAll();
|
//swAuManager.exitChannelAll();
|
||||||
L.e(TAG, "release------->");
|
L.e(TAG, "release------->");
|
||||||
|
@ -479,7 +479,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
}
|
}
|
||||||
isInstructor();
|
isInstructor();
|
||||||
|
|
||||||
/*RongConfigCenter.notificationConfig().setInterceptor(new NotificationConfig.Interceptor() {
|
RongConfigCenter.notificationConfig().setInterceptor(new NotificationConfig.Interceptor() {
|
||||||
@Override
|
@Override
|
||||||
public boolean isNotificationIntercepted(Message message) {
|
public boolean isNotificationIntercepted(Message message) {
|
||||||
return true;
|
return true;
|
||||||
@ -499,7 +499,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
public NotificationChannel onRegisterChannel(NotificationChannel notificationChannel) {
|
public NotificationChannel onRegisterChannel(NotificationChannel notificationChannel) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
RxView.clicks(findViewById(R.id.banner_click)).throttleFirst(2, TimeUnit.SECONDS).subscribe(new Observer<Unit>() {
|
RxView.clicks(findViewById(R.id.banner_click)).throttleFirst(2, TimeUnit.SECONDS).subscribe(new Observer<Unit>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
|
@ -75,9 +75,9 @@
|
|||||||
<bool name="rc_enable_send_combine_message">false</bool>
|
<bool name="rc_enable_send_combine_message">false</bool>
|
||||||
|
|
||||||
<!--在前台非会话页面时,接收到新消息是否响铃 -->
|
<!--在前台非会话页面时,接收到新消息是否响铃 -->
|
||||||
<bool name="rc_sound_in_foreground">true</bool>
|
<bool name="rc_sound_in_foreground">false</bool>
|
||||||
<!--在前台非会话页面时,接收到新消息是否震动-->
|
<!--在前台非会话页面时,接收到新消息是否震动-->
|
||||||
<bool name="rc_vibrate_in_foreground">true</bool>
|
<bool name="rc_vibrate_in_foreground">false</bool>
|
||||||
|
|
||||||
|
|
||||||
<!--会话页面右上角的未读 @ 消息数提示,当收到的消息中有 @ 消息时,进入会话之后,是否在右上角提示未读 @ 消息数-->
|
<!--会话页面右上角的未读 @ 消息数提示,当收到的消息中有 @ 消息时,进入会话之后,是否在右上角提示未读 @ 消息数-->
|
||||||
|
Loading…
Reference in New Issue
Block a user