微信分享的各种大小限制

 微信分享的图片,文字,title,content 各种限制,记录一下:

final boolean checkArgs() {
                if ((getType() == 8)
                                && (((this.thumbData == null) || (this.thumbData.length == 0)))) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, thumbData should not be null when send emoji");
                        return false;
                }
                if ((this.thumbData != null) && (this.thumbData.length > 32768)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, thumbData is invalid");
                        return false;
                }
                if ((this.title != null) && (this.title.length() > 512)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, title is invalid");
                        return false;
                }
                if ((this.description != null) && (this.description.length() > 1024)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, description is invalid");
                        return false;
                }
                if (this.mediaObject == null) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, mediaObject is null");
                        return false;
                }
                if ((this.mediaTagName != null) && (this.mediaTagName.length() > 64)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, mediaTagName is too long");
                        return false;
                }
                if ((this.messageAction != null)
                                && (this.messageAction.length() > 2048)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, messageAction is too long");
                        return false;
                }
                if ((this.messageExt != null) && (this.messageExt.length() > 2048)) {
                        a.a("MicroMsg.SDK.WXMediaMessage",
                                        "checkArgs fail, messageExt is too long");
                        return false;
                }
                return this.mediaObject.checkArgs();
        }

欢迎关注我的微信公众号:

微信分享的各种大小限制_第1张图片

你可能感兴趣的:(Android)