本文整理汇总了Java中com.umeng.socialize.media.UMEmoji类的典型用法代码示例。如果您正苦于以下问题:Java UMEmoji类的具体用法?Java UMEmoji怎么用?Java UMEmoji使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UMEmoji类属于com.umeng.socialize.media包,在下文中一共展示了UMEmoji类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseMediaType
import com.umeng.socialize.media.UMEmoji; //导入依赖的package包/类
private void parseMediaType() {
if (!TextUtils.isEmpty(this.mShareContent) && this.mShareMedia == null) {
this.mShareType = "text";
} else if (this.mShareMedia != null && (this.mShareMedia instanceof UMEmoji)) {
this.mShareType = TYPE_EMOJI;
} else if (TextUtils.isEmpty(this.mShareContent) && this.mShareMedia != null && (this
.mShareMedia instanceof UMImage)) {
this.mShareType = "image";
} else if (this.mShareMedia != null && (this.mShareMedia instanceof UMusic)) {
this.mShareType = TYPE_MUSIC;
} else if (this.mShareMedia != null && (this.mShareMedia instanceof UMVideo)) {
this.mShareType = TYPE_VIDEO;
} else if (!TextUtils.isEmpty(this.mShareContent) && this.mShareMedia != null && (this
.mShareMedia instanceof UMImage)) {
this.mShareType = TYPE_TEXT_IMAGE;
}
}
示例2: buildEmojiParams
import com.umeng.socialize.media.UMEmoji; //导入依赖的package包/类
private WXMediaMessage buildEmojiParams() {
UMEmoji emoji = this.mShareMedia;
UMImage image = emoji.mSrcImage;
String path = image.getImageCachePath();
WXEmojiObject wxEmojiObject = new WXEmojiObject();
if (emoji.mSrcImage.isUrlMedia()) {
path = BitmapUtils.getFileName(image.toUrl());
if (!new File(path).exists()) {
BitmapUtils.loadImage(image.toUrl(), 150, 150);
}
}
wxEmojiObject.emojiPath = path;
WXMediaMessage msg = new WXMediaMessage();
msg.mediaObject = wxEmojiObject;
if (emoji.getThumbImage() != null) {
msg.thumbData = emoji.mThumb.toByte();
} else if (TextUtils.isEmpty(emoji.getThumb())) {
msg.thumbData = emoji.mSrcImage.toByte();
} else {
Bitmap bitmap = BitmapUtils.loadImage(emoji.getThumb(), 150, 150);
msg.thumbData = BitmapUtils.bitmap2Bytes(bitmap);
bitmap.recycle();
}
msg.title = this.mTitle;
msg.description = this.mShareContent;
return msg;
}
示例3: WeiXinShareContent
import com.umeng.socialize.media.UMEmoji; //导入依赖的package包/类
public WeiXinShareContent(UMEmoji emoji) {
super((UMediaObject) emoji);
}
示例4: getEmojiMedia
import com.umeng.socialize.media.UMEmoji; //导入依赖的package包/类
public UMEmoji getEmojiMedia() {
return emojiMedia;
}
示例5: setEmojiMedia
import com.umeng.socialize.media.UMEmoji; //导入依赖的package包/类
public void setEmojiMedia(UMEmoji emojiMedia) {
this.emojiMedia = emojiMedia;
}