• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java UMVideo类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.umeng.socialize.media.UMVideo的典型用法代码示例。如果您正苦于以下问题:Java UMVideo类的具体用法?Java UMVideo怎么用?Java UMVideo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

UMVideo类属于com.umeng.socialize.media包,在下文中一共展示了UMVideo类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: parseMediaType

点赞 3

import com.umeng.socialize.media.UMVideo; //导入依赖的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;
    }
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:18,
代码来源:UMWXHandler.java

示例2: buildParams

点赞 3

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
private void buildParams() {
    this.mParams = new Bundle();
    this.mParams.putString("summary", this.mShareContent);
    if ((this.mShareMedia instanceof UMImage) && TextUtils.isEmpty(this.mShareContent)) {
        this.mShareType = 5;
        buildImageParams(this.mParams);
    } else if ((this.mShareMedia instanceof UMusic) || (this.mShareMedia instanceof UMVideo)) {
        this.mShareType = 2;
        buildAudioParams(this.mParams);
    } else {
        buildTextImageParams(this.mParams);
    }
    this.mParams.putInt("req_type", this.mShareType);
    if (TextUtils.isEmpty(this.mTitle)) {
        this.mTitle = "分享到QQ";
    }
    if (TextUtils.isEmpty(this.mTargetUrl)) {
        this.mTargetUrl = SocializeConstants.SOCIAL_LINK;
    }
    this.mParams.putString("targetUrl", this.mTargetUrl);
    this.mParams.putString("title", this.mTitle);
    this.mParams.putString("appName", getAppName());
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:24,
代码来源:UMQQSsoHandler.java

示例3: setShareToAudio

点赞 3

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
private void setShareToAudio(Bundle bundle, UMediaObject uMediaObject) {
    if (uMediaObject == null || !((uMediaObject instanceof UMusic) || (uMediaObject
            instanceof UMVideo))) {
        Log.e(TAG, "请设置分享媒体...");
        return;
    }
    if (uMediaObject instanceof UMusic) {
        parseMusic(uMediaObject);
    } else if (uMediaObject instanceof UMVideo) {
        parseVideo(uMediaObject);
    }
    String path = (String) this.mExtraData.get("image_path_local");
    if (TextUtils.isEmpty(path)) {
        path = (String) this.mExtraData.get("image_path_url");
    }
    bundle.putString("imageUrl", path);
    bundle.putString("targetUrl", this.mTargetUrl);
    bundle.putString("audio_url", uMediaObject.toUrl());
    bundle.putString("title", this.mTitle);
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:21,
代码来源:QZoneSsoHandler.java

示例4: parseVideo

点赞 3

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
protected void parseVideo(UMediaObject uMediaObject) {
    UMVideo uMVideo = (UMVideo) uMediaObject;
    this.mExtraData.put("audio_url", uMVideo.toUrl());
    boolean isEmpty = TextUtils.isEmpty(this.mTargetUrl);
    if (TextUtils.isEmpty(uMVideo.getThumb())) {
        parseImage(uMVideo.getThumbImage());
    } else {
        this.mExtraData.put(IMAGE_PATH_URL, uMVideo.getThumb());
    }
    if (!TextUtils.isEmpty(uMVideo.getTitle())) {
        this.mTitle = uMVideo.getTitle();
    }
    if (!isEmpty) {
        return;
    }
    if (TextUtils.isEmpty(uMVideo.getTargetUrl())) {
        this.mTargetUrl = uMVideo.toUrl();
    } else {
        this.mTargetUrl = uMVideo.getTargetUrl();
    }
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:22,
代码来源:UMSsoHandler.java

示例5: initView

点赞 3

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
public void initView() {

        ToastUtil.showToast(preActivity);
        //Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.info_icon_1);
        //UMImage image = new UMImage(ShareActivity.this,bitmap);
        UMusic music = new UMusic("http://music.huoxing.com/upload/20130330/1364651263157_1085.mp3");
/*        music = new UMusic("http://y.qq.com/#type=song&mid=002I7CmS01UAIH&tpl=yqq_song_detail");
        music.setTitle("This is music title");
        music.setThumb("http://www.umeng.com/images/pic/social/chart_1.png");

        music.setDescription("my description");*/
        video = new UMVideo("http://video.sina.com.cn/p/sports/cba/v/2013-10-22/144463050817.html");
//        video.setThumb("http://www.adiumxtras.com/images/thumbs/dango_menu_bar_icon_set_11_19047_6240_thumb.png");
        url = "http://www.umeng.com";

        slWeixin.setOnClickListener(new ClickListener());
        slWeixinSpace.setOnClickListener(new ClickListener());
//        slWeibo.setOnClickListener(new ClickListener());
        slQq.setOnClickListener(new ClickListener());
        slQqSpace.setOnClickListener(new ClickListener());
        slSms.setOnClickListener(new ClickListener());
//        slCancel.setOnClickListener(new ClickListener());
    }
 

开发者ID:Alex-Jerry,
项目名称:LLApp,
代码行数:24,
代码来源:ToShare.java

示例6: buildAudioParams

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
private void buildAudioParams(Bundle bundle) {
    if (this.mShareMedia instanceof UMusic) {
        parseMusic(this.mShareMedia);
    } else if (this.mShareMedia instanceof UMVideo) {
        parseVideo(this.mShareMedia);
    }
    String path = (String) this.mExtraData.get("image_path_local");
    String urlPath = (String) this.mExtraData.get("image_path_url");
    if (!TextUtils.isEmpty(path) && BitmapUtils.isFileExist(path)) {
        bundle.putString("imageLocalUrl", path);
    } else if (!TextUtils.isEmpty(urlPath)) {
        bundle.putString("imageUrl", urlPath);
    }
    bundle.putString("audio_url", this.mShareMedia.toUrl());
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:16,
代码来源:UMQQSsoHandler.java

示例7: getThumbByteArray

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
protected byte[] getThumbByteArray(UMediaObject uMediaObject) {
    if (uMediaObject == null) {
        return null;
    }
    byte[] bArr;
    Object obj = "";
    if (uMediaObject instanceof UMusic) {
        UMusic uMusic = (UMusic) uMediaObject;
        obj = uMusic.getThumb();
        uMediaObject = uMusic.getThumbImage();
    } else if (uMediaObject instanceof UMVideo) {
        UMVideo uMVideo = (UMVideo) uMediaObject;
        obj = uMVideo.getThumb();
        uMediaObject = uMVideo.getThumbImage();
    } else if (uMediaObject instanceof UMWebPage) {
        UMWebPage uMWebPage = (UMWebPage) uMediaObject;
        obj = uMWebPage.getThumb();
        uMediaObject = uMWebPage.getThumbImage();
    } else if (uMediaObject instanceof UMImage) {
        UMImage uMImage = (UMImage) uMediaObject;
        if (!TextUtils.isEmpty(uMImage.getThumb())) {
            obj = uMImage.getThumb();
        } else if (uMImage.isUrlMedia()) {
            obj = uMImage.toUrl();
        }
    } else {
        uMediaObject = null;
    }
    if (uMediaObject != null && uMediaObject.isUrlMedia()) {
        obj = uMediaObject.toUrl();
    }
    if (!TextUtils.isEmpty(obj)) {
        Bitmap bitmapFromFile = BitmapUtils.getBitmapFromFile(obj, this.mThumbSize, this
                .mThumbSize);
        if (!(bitmapFromFile == null || bitmapFromFile.isRecycled())) {
            byte[] bitmap2Bytes = BitmapUtils.bitmap2Bytes(bitmapFromFile);
            bitmapFromFile.recycle();
            bArr = bitmap2Bytes;
            if ((bArr == null && bArr.length != 0) || uMediaObject == null || uMediaObject
                    .isUrlMedia()) {
                return bArr;
            }
            return uMediaObject.toByte();
        }
    }
    bArr = null;
    if (bArr == null) {
    }
    return uMediaObject.toByte();
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:51,
代码来源:CustomHandler.java

示例8: buildParams

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
private Bundle buildParams(UMShareMsg shareMsg) {
    Bundle bundle = new Bundle();
    String shareContent = shareMsg.mText;
    int shareType = 1;
    UMediaObject uMediaObject = shareMsg.getMedia();
    if (uMediaObject instanceof QZoneShareContent) {
        QZoneShareContent qZoneShareContent = (QZoneShareContent) uMediaObject;
        this.mTitle = qZoneShareContent.getTitle();
        shareContent = qZoneShareContent.getShareContent();
        if (!TextUtils.isEmpty(qZoneShareContent.getTargetUrl())) {
            this.mTargetUrl = qZoneShareContent.getTargetUrl();
        }
        uMediaObject = qZoneShareContent.getShareMedia();
    }
    if ((uMediaObject instanceof UMImage) && TextUtils.isEmpty(shareContent)) {
        shareType = 5;
        setShareToImage(bundle, uMediaObject);
    } else if ((uMediaObject instanceof UMVideo) || (uMediaObject instanceof UMusic)) {
        shareType = 2;
        setShareToAudio(bundle, uMediaObject);
    } else {
        setShareToTextAndImage(bundle, uMediaObject);
    }
    bundle.putString("summary", shareContent);
    ArrayList<String> paths = new ArrayList();
    String imagePath = bundle.getString("imageUrl");
    bundle.remove("imageUrl");
    if (!TextUtils.isEmpty(imagePath)) {
        paths.add(imagePath);
    }
    bundle.putStringArrayList("imageUrl", paths);
    bundle.putInt("req_type", shareType);
    if (TextUtils.isEmpty(bundle.getString("title"))) {
        bundle.putString("title", "分享到QQ空间");
    }
    if (TextUtils.isEmpty(bundle.getString("targetUrl"))) {
        bundle.putString("targetUrl", SocializeConstants.SOCIAL_LINK);
        Log.w(TAG, "没有设置QZone targetUrl,分享将采用友盟默认targetUrl");
    }
    bundle.putString("appName", getAppName());
    this.mExtraData.clear();
    this.mExtraData.put(SocializeConstants.FIELD_QZONE_ID, this.mAppID);
    this.mExtraData.put("qzone_secret", this.mAppKey);
    return bundle;
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:46,
代码来源:QZoneSsoHandler.java

示例9: CircleShareContent

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
public CircleShareContent(UMVideo video) {
    super((UMediaObject) video);
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:4,
代码来源:CircleShareContent.java

示例10: WeiXinShareContent

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
public WeiXinShareContent(UMVideo video) {
    super((UMediaObject) video);
}
 

开发者ID:JackChan1999,
项目名称:boohee_v5.6,
代码行数:4,
代码来源:WeiXinShareContent.java

示例11: getVideoMedia

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
public UMVideo getVideoMedia() {
    return videoMedia;
}
 

开发者ID:fg2q1q3q,
项目名称:UmengShare,
代码行数:4,
代码来源:ShareModel.java

示例12: setVideoMedia

点赞 2

import com.umeng.socialize.media.UMVideo; //导入依赖的package包/类
public void setVideoMedia(UMVideo videoMedia) {
    this.videoMedia = videoMedia;
}
 

开发者ID:fg2q1q3q,
项目名称:UmengShare,
代码行数:4,
代码来源:ShareModel.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)