• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

抖音自定义卡片链接(链接)

武飞扬头像
若水情缘
帮助1

效果

学新通

主要代码

public static String LIZIZ(int i, BaseContent baseContent, Map<String, String> map) {
        GroupInviteCardInfo groupInviteCardInfo;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{Integer.valueOf(i), baseContent, map}, null, LIZ, true, 24);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        String str = "ask_for_update";
        switch (i) {
            case 2:
            case 27:
                return "pic";
            case 5:
                if (HCO.LIZIZ.LIZ(map)) {
                    return "lite_interaction";
                }
                if (baseContent.getType() != 501) {
                    if (baseContent.getType() == 502) {
                        return "giphy";
                    }
                    if (baseContent.getType() != 504) {
                        if (baseContent.getType() == 505 || baseContent.getType() == 506 || baseContent.getType() == 507) {
                            return "lite_emoji";
                        }
                        if (C60982Hkx.LIZJ().isMtCase()) {
                            return "sticker";
                        }
                    }
                }
                return "emoji";
            case 7:
                return LIZ(baseContent);
            case 8:
            case 77:
                return "share_video";
            case 12:
                return "share_picture";
            case 13:
                return "token_video_card";
            case MotionEventCompat.AXIS_LTRIGGER /*{ENCODED_INT: 17}*/:
            case 501:
                return DataType.AUDIO;
            case MotionEventCompat.AXIS_THROTTLE /*{ENCODED_INT: 19}*/:
            case MotionEventCompat.AXIS_GAS /*{ENCODED_INT: 22}*/:
            case MotionEventCompat.AXIS_TILT /*{ENCODED_INT: 25}*/:
            case 72:
                return "page";
            case 21:
                if (baseContent.getType() == 2101) {
                    return "familiar_invitation_ktv";
                }
                if (baseContent.getType() == 2102) {
                    return "familiar_invitation_chatting_room";
                }
                return "live_card";
            case MotionEventCompat.AXIS_DISTANCE /*{ENCODED_INT: 24}*/:
                return "mini_app";
            case 26:
                if (baseContent instanceof ShareWebContent) {
                    ShareWebContent shareWebContent = (ShareWebContent) baseContent;
                    if (shareWebContent.getAweType() != 0) {
                        str = shareWebContent.getMsgTrack();
                    } else {
                        str = "";
                    }
                    if (str == null) {
                        return "";
                    }
                    return str;
                }
                return "";
            case 30:
                return "video";
            case TTVideoEngine.PLAYER_OPTION_ENABLE_PLAYER3_HARDWARE_DECODE /*{ENCODED_INT: 31}*/:
                return "publish_at";
            case ImmersedStatusBarUtils.STATUS_BAR_ALPHA_20 /*{ENCODED_INT: 51}*/:
                if (baseContent.getType() == 5101) {
                    return "xmoji";
                }
                return "emoji";
            case 58:
                if (map == null || TextUtils.isEmpty(map.get("a:group_invite")) || Integer.parseInt((String) Objects.requireNonNull(map.get("a:group_invite"))) != 1) {
                    if (!(baseContent instanceof GroupInviteContent) || (groupInviteCardInfo = ((GroupInviteContent) baseContent).getGroupInviteCardInfo()) == null || groupInviteCardInfo.cardType.intValue() != 1) {
                        return "unknown";
                    }
                    return "group_card";
                }
                return "group_card";
            case ABOppoRedPointAppearAgainTimeInterval.VALUE_60 /*{ENCODED_INT: 60}*/:
                return "share_from_third";
            case 71:
                return "share";
            case 73:
                return "chat_call";
            case 74:
                return "redpacket";
            case 75:
                return "friend_video_card";
            case 78:
                return "invite";
            case 79:
            case 82:
                return "chat_game";
            case 80:
            case 94:
                return "fansgroup_coupon";
            case 83:
                return "ref_message";
            case 85:
                if ((baseContent instanceof UrgeLeaveContent) && ((UrgeLeaveContent) baseContent).isFromGroupOwner()) {
                    return "reply_to_update";
                }
                break;
            case 88:
                if (baseContent.getType() == 8800) {
                    return "poll";
                }
                if (baseContent.getType() == 8802 && (baseContent instanceof ImOneCardViewContent)) {
                    return C59913HLa.LIZ((ImOneCardViewContent) baseContent);
                }
                return "";
            case 91:
                return "only_once_pic";
            case 92:
                return "only_once_video";
            case 96:
                return "cloud_game_card";
            case 97:
                return "game_invite_card";
            case 99:
                return "group_card";
            case 502:
                return "location";
            case 1013:
                return "co_play_invitation";
        }
    }
学新通

发送逻辑

public void startTask(Activity activity) {
        try {
            final String id = ReflectionUtil.getFieldValue(activity.getIntent().getSerializableExtra("key_enter_chat_params"), "sessionId");
            MLog.log("id: "   id);
            int sendBtnId = 2131175609;
            int editTextId = 2131180296;
            View sendBtn = activity.findViewById(sendBtnId);
            EditText editView = (EditText) activity.findViewById(editTextId);
            View.OnClickListener orginaSendBtnClickListenr = ViewUtil.getViewClickListener(sendBtn);
            sendBtn.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    try {
                        CharSequence clipbardText = Utility.getClipbardText(activity);
                        MLog.log("剪贴板内容: "   clipbardText);
                        if (TextUtils.isEmpty(clipbardText) || !clipbardText.toString().startsWith("{") || !clipbardText.toString().endsWith("}")) {
                            orginaSendBtnClickListenr.onClick(v);
                            return;
                        }
                        JSONObject jSONObject = new JSONObject(clipbardText.toString());
                        String type = jSONObject.getString("type");
                        switch (type) {
                            case "1": {
                                String title = jSONObject.getString("title");
                                String imageUrl = jSONObject.getString("imageUrl");
                                String url = jSONObject.getString("url");
                                send(id, url, title, imageUrl);
                            }
                            break;
                        }
                        editView.setText("");
                    } catch (Exception e) {
                        Toast.makeText(activity, "代码有误,请检查代码", Toast.LENGTH_SHORT).show();
                        MLog.log(e);
                    }
                }
            });
        } catch (Exception e) {
            Toast.makeText(activity, "请检查版本", Toast.LENGTH_SHORT).show();
            MLog.log(e);
        }
    }
学新通

本文仅供学习交流,严禁用于商业用途

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhhagafg
系列文章
更多 icon
同类精品
更多 icon
继续加载