diff --git a/app/src/main/java/com/yizhuan/erban/MainActivity.java b/app/src/main/java/com/yizhuan/erban/MainActivity.java index d433358df..c8469d447 100644 --- a/app/src/main/java/com/yizhuan/erban/MainActivity.java +++ b/app/src/main/java/com/yizhuan/erban/MainActivity.java @@ -144,6 +144,7 @@ import com.yizhuan.xchat_android_core.im.custom.bean.OpenRoomNotiAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.OpenSignInAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.RedPackageAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.RedPacketAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RoomInviteFansAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgV2Attachment; import com.yizhuan.xchat_android_core.level.event.CharmLevelUpEvent; @@ -451,6 +452,8 @@ public class MainActivity extends BaseMvpActivity NimUIKit.registerMsgItemViewHolder(InAppSharingMiniWorldAttachment.class, InAppSharingMsgViewHolder.class); NimUIKit.registerMsgItemViewHolder(InAppSharingTeamAttachment.class, InAppSharingMsgViewHolder.class); NimUIKit.registerMsgItemViewHolder(LuckyMoneyTipsAttachment.class, LuckyMoneyTipsViewHolder.class); + //邀请 +// NimUIKit.registerMsgItemViewHolder(RoomInviteFansAttachment.class, LuckyMoneyTipsViewHolder.class); NimUIKit.setSessionListener(listener); NimUIKit.setContactEventListener(listener1); diff --git a/app/src/main/java/com/yizhuan/erban/NimMiddleActivity.java b/app/src/main/java/com/yizhuan/erban/NimMiddleActivity.java index ee279e90f..360900f55 100644 --- a/app/src/main/java/com/yizhuan/erban/NimMiddleActivity.java +++ b/app/src/main/java/com/yizhuan/erban/NimMiddleActivity.java @@ -6,6 +6,7 @@ import android.util.Log; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.coorchice.library.utils.LogUtils; import com.netease.nimlib.sdk.NimIntent; import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum; import com.netease.nimlib.sdk.msg.model.IMMessage; @@ -18,6 +19,9 @@ import com.yizhuan.xchat_android_core.auth.AuthModel; import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.OpenRoomNotiAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.OpenSignInAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RedPackageAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RoomInviteFansAttachment; +import com.yizhuan.xchat_android_library.utils.LogUtil; import com.yizhuan.xchat_android_library.utils.UIUtils; import java.util.ArrayList; @@ -73,6 +77,10 @@ public class NimMiddleActivity extends BaseActivity { } } + /** + * 推送通知栏点击 + * @param intent + */ private void parseNotifyIntent(Intent intent) { if (intent == null) { return; @@ -82,6 +90,7 @@ public class NimMiddleActivity extends BaseActivity { ArrayList messages = (ArrayList) intent.getSerializableExtra(NimIntent.EXTRA_NOTIFY_CONTENT); if (messages != null && messages.size() > 0) { IMMessage imMessage = messages.get(messages.size() - 1); + LogUtils.i( "getMsgType:"+imMessage.getMsgType() ); if (imMessage.getMsgType() == MsgTypeEnum.custom) { CustomAttachment attachment = (CustomAttachment) imMessage.getAttachment(); if (attachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_OPEN_ROOM_NOTI) { @@ -94,7 +103,24 @@ public class NimMiddleActivity extends BaseActivity { && !UIUtils.isTopActivity(this, SignInActivity.class.getSimpleName())) { SignInActivity.start(this); } + } else if (attachment.getFirst() == CustomAttachment.CUSTOM_MSG_RED_PACKAGE){ + if (attachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND){ + RedPackageAttachment redPackageAttachment = (RedPackageAttachment) attachment; + AVRoomActivity.start(this, redPackageAttachment.getRedPackageNotifyInfo().getRoomUid()); + } + } else if (attachment.getFirst() == CustomAttachment.CUSTOM_MSG_PUSH_NOTIFIFICATION){ + if (attachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM){ + RoomInviteFansAttachment noticeAttachment = (RoomInviteFansAttachment) attachment; + if (noticeAttachment.getRoomInviteFansInfo() == null){ + return; + } + AVRoomActivity.start(this, noticeAttachment.getRoomInviteFansInfo().getData().getRoomUid()); + } } + }else if (imMessage.getMsgType() == MsgTypeEnum.notification){ + LogUtils.i( "MsgTypeEnum.notification"); + }else if (imMessage.getMsgType() == MsgTypeEnum.text){ + LogUtils.i( "MsgTypeEnum.text"); } } finish(); diff --git a/app/src/main/java/com/yizhuan/erban/application/XChatApplication.java b/app/src/main/java/com/yizhuan/erban/application/XChatApplication.java index ae3514b5a..6e93b40e5 100644 --- a/app/src/main/java/com/yizhuan/erban/application/XChatApplication.java +++ b/app/src/main/java/com/yizhuan/erban/application/XChatApplication.java @@ -34,6 +34,7 @@ import com.netease.mobsec.rjsb.watchman; import com.netease.nim.uikit.api.NimUIKit; import com.netease.nim.uikit.common.util.log.LogUtil; import com.netease.nimlib.sdk.NIMClient; +import com.netease.nimlib.sdk.NotificationFoldStyle; import com.netease.nimlib.sdk.SDKOptions; import com.netease.nimlib.sdk.StatusBarNotificationConfig; import com.netease.nimlib.sdk.mixpush.MixPushConfig; @@ -73,6 +74,8 @@ import com.yizhuan.xchat_android_core.family.model.FamilyModel; import com.yizhuan.xchat_android_core.gift.GiftModel; import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.OpenSignInAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RoomInviteFansAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RoomInviteFansInfo; import com.yizhuan.xchat_android_core.interceptor.NoParamsInterceptor; import com.yizhuan.xchat_android_core.interceptor.ParamsInterceptor; import com.yizhuan.xchat_android_core.manager.IMMessageManager; @@ -121,6 +124,7 @@ import static com.yizhuan.xchat_android_constants.XChatConstants.XM_APP_ID; import static com.yizhuan.xchat_android_constants.XChatConstants.XM_APP_KEY; import static com.yizhuan.xchat_android_constants.XChatConstants.XM_CERTIFICATE_NAME; import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_OPEN_ROOM_NOTI; +import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_PUSH_NOTIFIFICATION; /** * @author chenran @@ -347,6 +351,7 @@ public class XChatApplication extends Application { config.ledARGB = Color.GREEN; config.ledOnMs = 1000; config.ledOffMs = 1500; + config.notificationFoldStyle = NotificationFoldStyle.CONTACT; // 通知铃声的uri字符串 config.notificationSound = "android.resource://com.netease.nim.demo/raw/msg"; options.statusBarNotificationConfig = config; @@ -411,6 +416,9 @@ public class XChatApplication extends Application { } else if (customAttachment instanceof OpenSignInAttachment) { return getContentFromOpenSignIn(customAttachment); } + else if (customAttachment.getFirst() == CUSTOM_MSG_PUSH_NOTIFIFICATION){ + return getContentRoomInvite(customAttachment); + } } // 采用SDK默认文案 return "收到一条消息"; @@ -424,6 +432,8 @@ public class XChatApplication extends Application { return message.getFromNick(); } else if (customAttachment instanceof OpenSignInAttachment) { return getContentFromOpenSignIn(customAttachment); + } else if (customAttachment instanceof RoomInviteFansAttachment){ + return getContentRoomInvite(customAttachment); } } // 采用SDK默认文案 @@ -444,6 +454,20 @@ public class XChatApplication extends Application { return result; } + private String getContentRoomInvite(CustomAttachment attachment) { + String result = null; + if (attachment instanceof RoomInviteFansAttachment) { + RoomInviteFansInfo roomInviteFansInfo = ((RoomInviteFansAttachment) attachment).getRoomInviteFansInfo(); + if (roomInviteFansInfo != null) { + result = roomInviteFansInfo.getPushTitle(); + } + } + if (TextUtils.isEmpty(result)) { + result = "收到一条消息"; + } + return result; + } + @Override public String makeRevokeMsgTip(String s, IMMessage imMessage) { return null; diff --git a/app/src/main/java/com/yizhuan/erban/avroom/adapter/MicroViewAdapter.java b/app/src/main/java/com/yizhuan/erban/avroom/adapter/MicroViewAdapter.java index a44950875..afee2f1dc 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/adapter/MicroViewAdapter.java +++ b/app/src/main/java/com/yizhuan/erban/avroom/adapter/MicroViewAdapter.java @@ -105,7 +105,9 @@ public class MicroViewAdapter extends BaseMicroViewAdapter { @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) { RoomQueueInfo roomQueueInfo = AvRoomDataManager.get().getRoomQueueMemberInfoByMicPosition(position - 1); - if (roomQueueInfo == null) return; + if (roomQueueInfo == null) { + return; + } NormalMicroViewHolder holder = (NormalMicroViewHolder) viewHolder; holder.bind(roomQueueInfo, position - 1); } diff --git a/app/src/main/java/com/yizhuan/erban/base/BaseMvpActivity.java b/app/src/main/java/com/yizhuan/erban/base/BaseMvpActivity.java index 48a6ff1be..22bd0e94f 100644 --- a/app/src/main/java/com/yizhuan/erban/base/BaseMvpActivity.java +++ b/app/src/main/java/com/yizhuan/erban/base/BaseMvpActivity.java @@ -92,7 +92,11 @@ import static com.yizhuan.xchat_android_core.Constants.DEBUG_MAX_UID; import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_HEAD_NOBLE; import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_SUB_OPENNOBLE; import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE; +import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_PUSH_NOTIFIFICATION; import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_RED_PACKAGE; +import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_CHAT_ROOM; +import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_DYNAMIC_MSG; +import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM; import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND; @@ -974,6 +978,25 @@ public abstract class BaseMvpActivity - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_common_cancel_22r.xml b/app/src/main/res/drawable/bg_common_cancel_22r.xml index c59dfac88..905fede03 100644 --- a/app/src/main/res/drawable/bg_common_cancel_22r.xml +++ b/app/src/main/res/drawable/bg_common_cancel_22r.xml @@ -2,7 +2,7 @@ - + diff --git a/app/src/main/res/drawable/bg_common_disable_22r.xml b/app/src/main/res/drawable/bg_common_disable_22r.xml new file mode 100644 index 000000000..80336757d --- /dev/null +++ b/app/src/main/res/drawable/bg_common_disable_22r.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/activity/RoomInviteFansActivity.java b/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/activity/RoomInviteFansActivity.java index 9e9987194..dee185d31 100644 --- a/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/activity/RoomInviteFansActivity.java +++ b/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/activity/RoomInviteFansActivity.java @@ -63,23 +63,30 @@ public class RoomInviteFansActivity extends BaseActivity { @SuppressLint("CheckResult") public void init() { - if (AvRoomDataManager.get().mCurrentRoomInfo == null){ - return; - } getInviteFans(); } @SuppressLint("CheckResult") private void getInviteFans(){ + if (AvRoomDataManager.get().mCurrentRoomInfo == null){ + return; + } RoomInviteFansModel.INSTANCE.getRoomInviteFans(AvRoomDataManager.get().mCurrentRoomInfo.getUid()) .doOnError(throwable -> LogUtil.print(throwable.getMessage())) .subscribe(info -> { tvInviteFansCount.setText(Html.fromHtml("确认邀请后会给收藏该房间的"+""+info.getFansNum()+""+"位用户发送提醒")); tvInviteFansTimes.setText(Html.fromHtml("今日剩余"+""+info.getInviteTimes()+""+"次")); + tvInviteFansConfirm.setBackground(getResources().getDrawable(R.drawable.bg_common_confirm_normal_22r)); if (info.getInviteInterval() > 0){ tvInviteFansConfirm.setClickable(false); startCountDownTimer(info.getInviteInterval()); }else { + if (info.getInviteTimes() <= 0){ + tvInviteFansConfirm.setBackground(getResources().getDrawable(R.drawable.bg_common_cancel_22r)); + tvInviteFansConfirm.setText("今日次数已用完"); + return; + } + tvInviteFansConfirm.setClickable(true); tvInviteFansConfirm.setText("确认邀请"); tvInviteFansConfirm.setOnClickListener(v -> { @@ -129,7 +136,7 @@ public class RoomInviteFansActivity extends BaseActivity { private void startCountDownTimer(long timeSecond) { stopCountDownTimer(); - timer = new InViteFansTimer(tvInviteFansConfirm,timeSecond*1000, 1000); + timer = new InViteFansTimer(this,tvInviteFansConfirm,timeSecond*1000, 1000); timer.start(); } diff --git a/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/utils/InViteFansTimer.java b/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/utils/InViteFansTimer.java index 942969e00..3deddcee7 100644 --- a/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/utils/InViteFansTimer.java +++ b/app/src/module_room_chat/java/com/yizhuan/tutu/room_chat/utils/InViteFansTimer.java @@ -1,10 +1,13 @@ package com.yizhuan.tutu.room_chat.utils; +import android.content.Context; import android.os.CountDownTimer; import android.text.Html; import android.view.View; import android.widget.TextView; +import com.yizhuan.erban.R; + /** * Created by zhouxiangfeng on 2017/5/2. @@ -12,6 +15,7 @@ import android.widget.TextView; public class InViteFansTimer extends CountDownTimer { private TextView tvInvite; + private Context mContext; /** * @param tvInvite @@ -21,9 +25,10 @@ public class InViteFansTimer extends CountDownTimer { * @param countDownInterval The interval along the way to receiver * {@link #onTick(long)} callbacks. */ - public InViteFansTimer(TextView tvInvite, long millisInFuture, long countDownInterval) { + public InViteFansTimer(Context context,TextView tvInvite, long millisInFuture, long countDownInterval) { super(millisInFuture, countDownInterval); this.tvInvite = tvInvite; + this.mContext = context; } @Override @@ -34,12 +39,14 @@ public class InViteFansTimer extends CountDownTimer { @Override public void onFinish() { + tvInvite.setBackground(mContext.getResources().getDrawable(R.drawable.bg_common_confirm_normal_22r)); tvInvite.setText(Html.fromHtml("确认邀请")); tvInvite.setClickable(true);//重新获得点击 } private String inviteInterval(int timeSecond){ + tvInvite.setBackground(mContext.getResources().getDrawable(R.drawable.bg_common_cancel_22r)); return (timeSecond / 60) + "分" + (timeSecond % 60) + "秒后可邀请"; } diff --git a/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java b/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java index 72e266a1e..67150cc07 100644 --- a/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java +++ b/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java @@ -83,6 +83,8 @@ import com.yizhuan.xchat_android_core.im.custom.bean.NobleAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.RoomGiftValueAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.RoomInfoAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RoomInviteFansAttachment; +import com.yizhuan.xchat_android_core.im.custom.bean.RoomInviteFansInfo; import com.yizhuan.xchat_android_core.im.custom.bean.RoomTipAttachment; import com.yizhuan.xchat_android_core.im.custom.bean.RouterType; import com.yizhuan.xchat_android_core.im.custom.bean.SysMsgAttachment; @@ -308,15 +310,17 @@ public final class IMNetEaseManager { model = AvRoomModel.get(); } + /** + * 推送通知,无论在前台后台都能收到 + */ private void registerMessageFilter() { NIMClient.getService(MsgService.class) .registerIMMessageFilter(message -> { if (message.getMsgType() == MsgTypeEnum.custom) { CustomAttachment customAttachment = (CustomAttachment) message.getAttachment(); - int second = customAttachment.getSecond(); switch (customAttachment.getFirst()) { case CustomAttachment.CUSTOM_MSG_HEADER_TYPE_LUCKY_MONEY: - switch (second) { + switch (customAttachment.getSecond()) { case CustomAttachment.CUSTOM_MSG_SUB_TYPE_RECEIVE_LUCKY_MONEY: LuckyMoneyTipsAttachment luckyMoneyAttachment = (LuckyMoneyTipsAttachment) message.getAttachment(); LuckyMoneyInfo luckyMoneyInfo = luckyMoneyAttachment.getLuckyMoneyInfo(); @@ -330,6 +334,16 @@ public final class IMNetEaseManager { break; } break; + + //邀请粉丝 +// case CustomAttachment.CUSTOM_MSG_PUSH_NOTIFIFICATION: +// switch (customAttachment.getSecond()){ +// case CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM: +// RoomInviteFansAttachment roomInviteFansAttachment = (RoomInviteFansAttachment) message.getAttachment(); +// RoomInviteFansInfo inviteFansInfo = roomInviteFansAttachment.getRoomInviteFansInfo(); +// return true; +// } +// break; } } else if (message.getMsgType() == MsgTypeEnum.notification) { NotificationAttachment notificationAttachment = (NotificationAttachment) message.getAttachment(); diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachParser.java b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachParser.java index 8c83c03db..3fc76f21e 100644 --- a/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachParser.java +++ b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachParser.java @@ -488,6 +488,16 @@ public class CustomAttachParser implements MsgAttachmentParser { } break; + case CustomAttachment.CUSTOM_MSG_PUSH_NOTIFIFICATION: + switch (second){ + case CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM: + attachment = new RoomInviteFansAttachment(second); + break; + default: + break; + } + break; + default: break; } diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachment.java b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachment.java index 88b18b052..b8ddd29b1 100644 --- a/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachment.java +++ b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/CustomAttachment.java @@ -346,9 +346,14 @@ public class CustomAttachment implements MsgAttachment { //红包消息 public static final int CUSTOM_MSG_RED_PACKAGE = 60; public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_DIAMOND = 602; - public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND = 604; + public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND = 604;//全服红包 public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG = 605; + //推送消息 + public static final int CUSTOM_MSG_PUSH_NOTIFIFICATION = 70; + public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM = 701;// 推送进入房间 + public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_CHAT_ROOM = 702;// 推送进入聊天页 + public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_DYNAMIC_MSG = 703;// 推送进入动态消息 public CustomAttachment() { diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/RoomInviteFansAttachment.java b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/RoomInviteFansAttachment.java new file mode 100644 index 000000000..b91381f26 --- /dev/null +++ b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/RoomInviteFansAttachment.java @@ -0,0 +1,33 @@ +package com.yizhuan.xchat_android_core.im.custom.bean; + +import com.alibaba.fastjson.JSONObject; +import com.google.gson.Gson; +import com.yizhuan.xchat_android_core.redpackage.RedPackageNotifyInfo; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Created by MadisonRong on 17/06/2018. + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class RoomInviteFansAttachment extends CustomAttachment { + + private RoomInviteFansInfo roomInviteFansInfo; + + public RoomInviteFansAttachment(int second) { + super(CUSTOM_MSG_PUSH_NOTIFIFICATION, second); + } + + @Override + protected void parseData(JSONObject data) { + roomInviteFansInfo = new Gson().fromJson(data.toJSONString(), RoomInviteFansInfo.class); + } + + @Override + protected JSONObject packData() { + String jsonStr = new Gson().toJson(roomInviteFansInfo); + return JSONObject.parseObject(jsonStr); + } +} diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/RoomInviteFansInfo.java b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/RoomInviteFansInfo.java new file mode 100644 index 000000000..9c1d39a00 --- /dev/null +++ b/core/src/main/java/com/yizhuan/xchat_android_core/im/custom/bean/RoomInviteFansInfo.java @@ -0,0 +1,25 @@ +package com.yizhuan.xchat_android_core.im.custom.bean; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class RoomInviteFansInfo implements Serializable { + + private String title; + + private String content; + + private JumpValue data; + + private int skiptype; + + private String pushTitle; + + @Data + public class JumpValue implements Serializable{ + private long roomUid; + } +} + diff --git a/gradle.properties b/gradle.properties index 2d774c6d5..1ed7ee96c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,5 +21,5 @@ with_jenkins=false #\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528 ndk_abi_filters=arm -version_name=1.2.1 -version_code=121 \ No newline at end of file +version_name=1.2.2 +version_code=122 \ No newline at end of file