diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index a5b3e3925..6d804b727 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -88,6 +88,9 @@ import io.rong.imkit.config.RongConfigCenter; import io.rong.imlib.RongIMClient; import io.rong.imlib.model.Conversation; import io.rong.imlib.model.MessageContent; +import io.rong.message.HQVoiceMessage; +import io.rong.message.ImageMessage; +import io.rong.message.SightMessage; import io.rong.message.TextMessage; //import cn.tillusory.sdk.TiSDK; @@ -280,7 +283,14 @@ public class AppContext extends CommonAppContext { content = new TextMessage(WordUtil.getNewString(R.string.activity_msg_chat_list_card)); } else if (message.getContent() instanceof TextMessage) { content = (TextMessage) message.getContent(); - }else{ + }else if(message.getContent() instanceof ImageMessage){ + content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_image)); + }else if(message.getContent() instanceof SightMessage){ + content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_sight)); + }else if(message.getContent() instanceof HQVoiceMessage){ + content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_voice)); + }else { + System.out.println("未知消息类型:"+message.getContent().getClass().getSimpleName()+"|"+message.getContent()); return false; } if (content.getContent().contains("_method_")) { diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java index ab87b670e..0d23a095b 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/MessageIMManager.java @@ -3,6 +3,7 @@ package com.yunbao.common.manager.imrongcloud; import android.app.Activity; import android.content.Context; import android.os.Handler; +import android.os.Looper; import android.text.TextUtils; import android.util.Log; import android.view.View; @@ -19,6 +20,7 @@ import com.yunbao.common.http.HttpClient; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.RouteUtil; +import com.yunbao.common.utils.ToastUtil; import org.greenrobot.eventbus.EventBus; @@ -100,13 +102,14 @@ public class MessageIMManager { @Override public void onSuccess(Integer integer) { imNumber = integer; + System.out.println(">>>>>>>>>未读数 "+integer); //发送通知 unreadMessagesHandler.post(essagesRunnable); } @Override public void onError(RongIMClient.ErrorCode e) { - + ToastUtil.showDebug(e.getMessage()); } }); @@ -214,6 +217,16 @@ public class MessageIMManager { //整合未读消息数目并且发送出去 private final Runnable essagesRunnable = () -> { number = imNumber + systemNumber; + /*if(AppManager.getInstance().getMainActivity()==null){ + new Handler(Looper.getMainLooper()).postDelayed(() -> { + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("消息", imNumber + ""); + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("系統", systemNumber + ""); + },300); + }else { + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("消息", imNumber + ""); + DebugDialog.getInstance(AppManager.getInstance().getMainActivity()).setParams("系統", systemNumber + ""); + }*/ + Log.i("未读消息", "消息: "+imNumber+" | 系统: "+systemNumber); EventBus.getDefault().post(new MessageIMEvent().setNumber(number).setMessage(imNumber)); }; diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java index 073f3d4cb..82f4b9a82 100644 --- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java +++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java @@ -118,7 +118,7 @@ public class RongcloudIMManager { * @param context */ public static void connectIM(Context context) { - MessageIMManager.get(context).addImRongCloudObserver(); + // MessageIMManager.get(context).addImRongCloudObserver(); MessageIMManager.get(context).getSystemMessages(); IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo(); String IMToken = userInfo.getTokenRong(); diff --git a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java index 0eb18135d..d1cdded48 100644 --- a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java +++ b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java @@ -70,7 +70,7 @@ public class MessageSayHiNotifyManager { return isInit; } - public synchronized void next() { + private synchronized void next() { Log.i(TAG, "next: 获取下一轮定时器信息&显示当前弹框"); LiveNetManager.get(AppManager.getInstance().getLastActivity()) .getMessageSayHiTimer(new HttpCallback() { diff --git a/common/src/main/res/drawable-xhdpi/rc_ic_bubble_right.9.png b/common/src/main/res/drawable-xhdpi/rc_ic_bubble_right.9.png index e8c25d7e2..fa9747a4b 100644 Binary files a/common/src/main/res/drawable-xhdpi/rc_ic_bubble_right.9.png and b/common/src/main/res/drawable-xhdpi/rc_ic_bubble_right.9.png differ diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index cd08f2dda..81a3a4f6a 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1058,11 +1058,11 @@ Limited ride And limited avatar frame Privacy Policy Terms and policies For details, please read the following message to install the application: - Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. + Welcome to PandoraLive. For your personal information and privacy, we will adopt the highest standards of treatment and protection. In order to provide users with better services, our products integrate [Alliance SDK], SDK needs to collect your device information (IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP address /SIM card IMSI information, etc.), In order for you to better understand the types and purposes of the data collected by [Alliance SDK] and how to protect your personal information, you can log on to: https://www.umeng.com/page/policy Learn about [Alliance SDK] Privacy Policy [Alliance +] Privacy Policy [Alliance +], a third-party global big data service provider, providing customers with PC/APP/ offline statistics, advertising effect monitoring, message push/micro community/sharing /IM and other operating tools,DIP, global index and industry reports. https://www.umeng.com/page/policy Clicking Agree means you have read and agree to all of the above.。 agreement - Welcome to PD LIVE. + Welcome to PandoraLive. gift User service agreement 一 Fan privilege 一 diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index d5173a2f3..ac78b6c8b 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1082,7 +1082,7 @@ 隱私條款 條款和政策 - 歡迎來到PD LIVE,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 + 歡迎來到PandoraLive,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 詳情請您閱讀以下安裝應用程序的消息: 為了給用戶提供更好的服務,我們的產品集成[友盟SDK],SDK需要收集您的设备信息(IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP地址/SIM 卡 IMSI 信息等),為便於您更好地了解[友盟SDK]采集的數據類型及用途,以及何保護您的個人信息,您可以登陸:https://www.umeng.com/page/policy 了解[友盟SDK]隱私權政策【友盟+】隐私政策【友盟+】,第三方全域大数据服务提供商,为客户提供PC/APP/线下统计,广告效果监测,消息推送/微社区/分享/IM等运营工具,DIP,全域指数与行业报告等。https://www.umeng.com/page/policy 同意 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index db249b27a..2e7f05456 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1082,7 +1082,7 @@ 隱私條款 條款和政策 - 歡迎來到PD LIVE,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 + 歡迎來到PandoraLive,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 詳情請您閱讀以下安裝應用程序的消息: 為了給用戶提供更好的服務,我們的產品集成[友盟SDK],SDK需要收集您的设备信息(IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP地址/SIM 卡 IMSI 信息等),為便於您更好地了解[友盟SDK]采集的數據類型及用途,以及何保護您的個人信息,您可以登陸:https://www.umeng.com/page/policy 了解[友盟SDK]隱私權政策【友盟+】隐私政策【友盟+】,第三方全域大数据服务提供商,为客户提供PC/APP/线下统计,广告效果监测,消息推送/微社区/分享/IM等运营工具,DIP,全域指数与行业报告等。https://www.umeng.com/page/policy 同意 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index a1f302679..919df0477 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1082,7 +1082,7 @@ 隱私條款 條款和政策 - 歡迎來到PD LIVE,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 + 歡迎來到PandoraLive,對於您的個人信息及隱私,我們將採用最高標準對待和保護。 詳情請您閱讀以下安裝應用程序的消息: 為了給用戶提供更好的服務,我們的產品集成[友盟SDK],SDK需要收集您的设备信息(IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP地址/SIM 卡 IMSI 信息等),為便於您更好地了解[友盟SDK]采集的數據類型及用途,以及何保護您的個人信息,您可以登陸:https://www.umeng.com/page/policy 了解[友盟SDK]隱私權政策【友盟+】隐私政策【友盟+】,第三方全域大数据服务提供商,为客户提供PC/APP/线下统计,广告效果监测,消息推送/微社区/分享/IM等运营工具,DIP,全域指数与行业报告等。https://www.umeng.com/page/policy 同意 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index bf25cee73..cf8be52e5 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1058,11 +1058,11 @@ Limited ride And limited avatar frame Privacy Policy Terms and policies For details, please read the following message to install the application: - Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. + Welcome to PandoraLive. For your personal information and privacy, we will adopt the highest standards of treatment and protection. In order to provide users with better services, our products integrate [Alliance SDK], SDK needs to collect your device information (IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IP address /SIM card IMSI information, etc.), In order for you to better understand the types and purposes of the data collected by [Alliance SDK] and how to protect your personal information, you can log on to: https://www.umeng.com/page/policy Learn about [Alliance SDK] Privacy Policy [Alliance +] Privacy Policy [Alliance +], a third-party global big data service provider, providing customers with PC/APP/ offline statistics, advertising effect monitoring, message push/micro community/sharing /IM and other operating tools,DIP, global index and industry reports. https://www.umeng.com/page/policy Clicking Agree means you have read and agree to all of the above.。 agreement - Welcome to PD LIVE. + Welcome to PandoraLive. gift User service agreement 一 Fan privilege 一 diff --git a/live/src/main/res/layout/rc_conversationlist_item.xml b/live/src/main/res/layout/rc_conversationlist_item.xml index 18fa0a8d9..a1ce6d26d 100644 --- a/live/src/main/res/layout/rc_conversationlist_item.xml +++ b/live/src/main/res/layout/rc_conversationlist_item.xml @@ -14,7 +14,7 @@ android:id="@+id/rc_conversation_portrait_rl" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginStart="@dimen/rc_margin_size_12" + android:layout_marginTop="@dimen/rc_margin_size_12" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -107,7 +107,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/rc_margin_size_16" - android:layout_marginEnd="@dimen/rc_margin_size_12" android:text="3 月 22 日" android:textColor="@color/rc_auxiliary_color" android:textSize="@dimen/rc_font_nav_or_date_size" diff --git a/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java b/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java index 5785dbece..abfa024bf 100644 --- a/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CompleteUserInfoActivity.java @@ -207,6 +207,10 @@ public class CompleteUserInfoActivity extends AbsActivity { avatar.setTag("https://downs.yaoulive.com/defaultblue.jpg"); avatarChange.setOnClickListener(view -> { UserAvatarPopup userAvatarPopup = new UserAvatarPopup(this, userAvatar1 -> { + if(StringUtil.isEmpty(userAvatar1)){ + ToastUtil.show(R.string.upload_fail); + return; + } avatar.setTag(userAvatar1); ImgLoader.display(this, userAvatar1, avatar); //txtChoose.setVisibility(View.GONE); @@ -230,6 +234,11 @@ public class CompleteUserInfoActivity extends AbsActivity { onSuccessToUrl(file, new OnItemClickListener() { @Override public void onItemClick(String bean, int position) { + if(StringUtil.isEmpty(bean)){ + ToastUtil.show(R.string.upload_fail); + loading.dismiss(); + return; + } avatar.setTag(bean); ImgLoader.display(mContext, bean, avatar); loading.dismiss(); diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index c70c8fc49..5d07dc0a2 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -93,6 +93,7 @@ import com.yunbao.common.manager.APKManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.OpenAdManager; +import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; @@ -235,6 +236,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void run() { ConversationIMListManager.get(mContext).addUserInfoProvider(); + MessageIMManager.get(mContext).resetImUnReadMessageCount(mContext); } }, 1000); UserInfoManager.updateMyInfo(this, null); diff --git a/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java index 42fb4d7da..efae84832 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java @@ -86,6 +86,12 @@ public class MainMsgAddressBookListAdapter extends BaseAdapter { + RouteUtil.forwardUserHome(mDataList.get(position).getId()); + }); + } holder.getConvertView().setTag(mDataList.get(position)); holder.getConvertView().setOnClickListener(view -> { AppManager.runDebugCode(new Runnable() { diff --git a/main/src/main/res/layout/activity_edit_user_hobby.xml b/main/src/main/res/layout/activity_edit_user_hobby.xml index 83e466a33..e915f5f6e 100644 --- a/main/src/main/res/layout/activity_edit_user_hobby.xml +++ b/main/src/main/res/layout/activity_edit_user_hobby.xml @@ -34,63 +34,53 @@ app:layout_constraintStart_toStartOf="@+id/titleView" app:layout_constraintTop_toBottomOf="@+id/titleView" /> - + + - - - - - - -