• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java QzoneShare类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: shareToQzone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public static void shareToQzone (final Activity activity,final String url,final String title,final String desc,final String img,IUiListener listener) {

        if (api == null) {
            api = Tencent.createInstance(APP_ID, MainApp.getContext());
        }


        if(api==null){
            return;
        }

        ArrayList<String> imgs=new ArrayList<>();
        if(!StringUtils.isEmpty(img)) {
            imgs.add(img);
        }else{
            imgs.add("http://youkes.oss.aliyuncs.com/icon/icon_96.png");
        }
        final Bundle params = new Bundle();
        params.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);//必填
        params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, desc);//选填
        params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, url);//必填
        params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgs);
        api.shareToQzone(activity, params, listener);
    }
 
开发者ID:NewCasino,项目名称:browser,代码行数:25,代码来源:QQShareApi.java


示例2: doShareToQQZone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private void doShareToQQZone() {
    if (Content.Type.LINK != shareContent.getType()) {
        LogUtils.e("%s: Unsupported content, finish.", TAG);
        Toast.makeText(this, R.string.share_failed, Toast.LENGTH_SHORT).show();
        finish();
        return;
    }

    Bundle params = new Bundle();
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, shareContent.getTitle());
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, shareContent.getSummary());
    ArrayList<String> imageUrls = new ArrayList<>();
    imageUrls.add(shareContent.getImageUrl());
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imageUrls);
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, shareContent.getTargetUrl());

    api.shareToQzone(QQEnrtyActivity.this, params, qqShareListener);
}
 
开发者ID:szitguy,项目名称:Allshare,代码行数:19,代码来源:QQEnrtyActivity.java


示例3: shareAppToQzone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public void shareAppToQzone(Activity activity, SKTencentContent content, final SKShare.ShareCallback callback) {
    mActivity = activity;
    this.callback = callback;
    Bundle bundle = new Bundle();
    bundle.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_APP);
    bundle.putString(QzoneShare.SHARE_TO_QQ_TITLE, content.title);
    bundle.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, content.content);
    bundle.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, content.url);
    if (!TextUtils.isEmpty(content.url)) {
        bundle.putString(QzoneShare.SHARE_TO_QQ_IMAGE_LOCAL_URL, content.imageUrl);
        ArrayList<String> imageUrls = new ArrayList<>();
        imageUrls.add(content.imageUrl);
        bundle.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imageUrls);
    }
    bundle.putString(QzoneShare.SHARE_TO_QQ_APP_NAME, content.appName);
    mTencent.shareToQzone(activity, bundle, iUiListener);
}
 
开发者ID:jhwing,项目名称:SKShare,代码行数:18,代码来源:SKQzoneShare.java


示例4: shareImageText

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private void shareImageText(BaseShareParam params, ShareImage image) throws ShareException {
    if (TextUtils.isEmpty(params.getTitle()) || TextUtils.isEmpty(params.getTargetUrl())) {
        throw new InvalidParamException("Title or target url is empty or illegal");
    }

    Log.d(TAG, "share image text");
    Bundle bundle = new Bundle();
    bundle.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    bundle.putString(QzoneShare.SHARE_TO_QQ_TITLE, params.getTitle());
    bundle.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, params.getContent());
    bundle.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, params.getTargetUrl());

    ArrayList<String> imageUrls = new ArrayList<>();
    if (image != null) {
        if (image.isNetImage()) {
            imageUrls.add(image.getNetImageUrl());
        } else if (image.isLocalImage()) {
            imageUrls.add(image.getLocalPath());
        }
    }
    bundle.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imageUrls);

    doShareToQQ((Activity) getContext(), bundle);
}
 
开发者ID:Bilibili,项目名称:BiliShare,代码行数:25,代码来源:QQZoneShareHandler.java


示例5: shareToQZone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
/**
 * 分享到QQ空间
 */
static void shareToQZone(final Activity activity, final ShareContent shareContent) {
	DebugLog.d(TAG, "shareToQZone() shareContent = " + shareContent);
	
	new Thread(new Runnable() {
		
		@Override
		public void run() {
			Bundle params = new Bundle();
	        params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
	        
	        params.putString(QzoneShare.SHARE_TO_QQ_TITLE, shareContent.getTitle());
	        params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, shareContent.getSummary());
	        
	        //注意:APP分享不支持传目标链接
	        params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, shareContent.getLinkUrl());
               
               params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, shareContent.getImages());
               
               Tencent tencent = MyApp.getApp().getTencent();
			tencent.shareToQzone(activity, params, null);
		}
	}).start();
}
 
开发者ID:leleliu008,项目名称:Newton_for_Android_AS,代码行数:27,代码来源:ShareUtils.java


示例6: qzoneShare

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public void qzoneShare(ShareData shareData, QQListener qzoneShareListener) {
        Bundle bundle = new Bundle();
        bundle.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
        bundle.putString(QzoneShare.SHARE_TO_QQ_TITLE, shareData.title);
        bundle.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, shareData.content);
        bundle.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, shareData.targetUrl);
        bundle.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, shareData.imgList);
//        ArrayList<String> imgList = new ArrayList<String>(1);
//        imgList.add("http://p2.so.qhimg.com/t01dba9a5ac5641a797.jpg");
//        bundle.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgList);
        if (null != tencent) {
            tencent.shareToQzone(context, bundle, qzoneShareListener);
        } else {
            LogUtils.e("tencent未初始化");
            Toast.makeText(context, "tencent未初始化", Toast.LENGTH_SHORT).show();
        }
    }
 
开发者ID:BruceHurrican,项目名称:asstudydemo,代码行数:18,代码来源:QQLoginAndShare.java


示例7: shareMsg

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
@Override
public void shareMsg(Activity ctx, AbsShareMsg msg, CallbackListener listener) {
	MsgImagesText mt = null;
	if (msg instanceof MsgImagesText) {
		mt = (MsgImagesText) msg;

		final Bundle params = new Bundle();
		params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
		params.putString(QzoneShare.SHARE_TO_QQ_TITLE, mt.title);
		params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, mt.summary);
		params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, mt.targetUrl);
		params.putString(QzoneShare.SHARE_TO_QQ_IMAGE_URL, mt.imageUrls.get(0));
		mQzoneShare.shareToQQ(ctx, params, new BaseUiListener(listener));
	}else if(msg instanceof MsgImage){
		shareImageMsg(ctx, (MsgImage) msg, listener);
	}
}
 
开发者ID:simplelifetian,项目名称:GomeOnline,代码行数:18,代码来源:PlatformQzone.java


示例8: shareToQZoneForText

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private void shareToQZoneForText(String text, Activity activity, ShareListener listener) {
    final Bundle params = new Bundle();
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE,
            QzonePublish.PUBLISH_TO_QZONE_TYPE_PUBLISHMOOD);
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, text);
    mTencent.publishToQzone(activity, params, listener);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:QQShareInstance.java


示例9: shareToQZoneForMedia

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private void shareToQZoneForMedia(String title, String targetUrl, String summary,
        String imageUrl, Activity activity, ShareListener listener) {
    final Bundle params = new Bundle();
    final ArrayList<String> image = new ArrayList<>();
    image.add(imageUrl);
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE,
            QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, summary);
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, targetUrl);
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, image);
    mTencent.shareToQzone(activity, params, listener);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:QQShareInstance.java


示例10: shareToQzoneForImage

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private void shareToQzoneForImage(String imagePath, Activity activity, ShareListener listener) {
    final Bundle params = new Bundle();
    final ArrayList<String> image = new ArrayList<>();
    image.add(imagePath);
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE,
            QzonePublish.PUBLISH_TO_QZONE_TYPE_PUBLISHMOOD);
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, image);
    mTencent.publishToQzone(activity, params, listener);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:QQShareInstance.java


示例11: shareToQZone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public static void shareToQZone(Context context, String appId, String title, String summary, String url,
                                String imageUrl, IUiListener listener) {
    Bundle params = new Bundle();
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, summary);
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, url);
    ArrayList<String> imgs = new ArrayList<String>();
    imgs.add(imageUrl);
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgs);
    Tencent tencent = getInstance(context, appId);
    tencent.shareToQzone((Activity) context, params, listener);
}
 
开发者ID:yangjie127,项目名称:ESSocialSDK-master,代码行数:14,代码来源:QQShareProxy.java


示例12: shareToQzone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public void shareToQzone() {
    final QQToken token = getToken();
    if (token != null) {
        QzoneShare qzoneShare = new QzoneShare(this, token);
        Bundle bundle = new Bundle();
        bundle.putInt("req_type", 1);
        bundle.putString("title", this.model.a);
        bundle.putString("summary", this.model.b);
        bundle.putString("targetUrl", this.model.d);
        ArrayList arrayList = new ArrayList();
        f.b(f.d, "-->shareToQzone : mIconUrl = " + this.model.c);
        arrayList.add(this.model.c);
        bundle.putStringArrayList("imageUrl", arrayList);
        qzoneShare.shareToQzone(this, bundle, new IUiListener(this) {
            final /* synthetic */ AppbarActivity b;

            public void onError(UiError uiError) {
                f.b(f.d, "-->(AppbarActivity)shareToQzone onError");
                this.b.jsBridge.responseShareFail(2);
            }

            public void onComplete(Object obj) {
                f.b(f.d, "-->(AppbarActivity)shareToQzone onComplete");
                this.b.jsBridge.responseShare(2);
                a.a(token.getAppId(), PLAYER.PLAY, "SDK.APPBAR.HOME.SHARE.QZ");
            }

            public void onCancel() {
                f.b(f.d, "-->(AppbarActivity)shareToQzone onCancel");
                this.b.jsBridge.responseShareFail(2);
            }
        });
        a.a(token.getAppId(), "200", "SDK.APPBAR.HOME.SHARE.QZ");
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:36,代码来源:AppbarActivity.java


示例13: shareText

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
@Override
public void shareText(int shareTarget, Activity activity, ShareObj shareMediaObj) {
    if (shareTarget == Target.SHARE_QQ_FRIENDS) {
        shareTextByIntent(activity, shareMediaObj, SocialConstants.QQ_PKG, SocialConstants.QQ_FRIENDS_PAGE);
    } else if (shareTarget == Target.SHARE_QQ_ZONE) {
        final Bundle params = new Bundle();
        params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzonePublish.PUBLISH_TO_QZONE_TYPE_PUBLISHMOOD);
        params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, shareMediaObj.getSummary());
        mTencentApi.publishToQzone(activity, params, mIUiListenerWrap);
    }
}
 
开发者ID:chendongMarch,项目名称:SocialSdkLibrary,代码行数:12,代码来源:QQPlatform.java


示例14: shareVideo

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
@Override
public void shareVideo(int shareTarget, Activity activity, ShareObj obj) {
    if (shareTarget == Target.SHARE_QQ_FRIENDS) {
        if (obj.isShareByIntent()) {
            shareVideoByIntent(activity, obj, SocialConstants.QQ_PKG, SocialConstants.QQ_FRIENDS_PAGE);
        } else {
            // 使用 web 格式分享
            LogUtils.e(TAG, "qq不支持分享视频,使用web分享代替");
            obj.setTargetUrl(obj.getMediaPath());
            shareWeb(shareTarget, activity, obj);
        }
    } else if (shareTarget == Target.SHARE_QQ_ZONE) {
        // qq 空间支持本地文件发布
        if (!FileUtils.isHttpPath(obj.getMediaPath())) {
            LogUtils.e(TAG, "qq空间本地视频分享");
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
                    && activity.checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED) {
                this.mIUiListenerWrap.onError(new SocialException("没有获取到读存储卡的权限,qq 空间分享本地视频功能无法继续"));
                return;
            }
            final Bundle params = new Bundle();
            params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzonePublish.PUBLISH_TO_QZONE_TYPE_PUBLISHVIDEO);
            params.putString(QzonePublish.PUBLISH_TO_QZONE_VIDEO_PATH, obj.getMediaPath());
            mTencentApi.publishToQzone(activity, params, mIUiListenerWrap);
        } else {
            LogUtils.e(TAG, "qq空间网络视频,使用web形式分享");
            shareWeb(shareTarget, activity, obj);
        }
    }
}
 
开发者ID:chendongMarch,项目名称:SocialSdkLibrary,代码行数:31,代码来源:QQPlatform.java


示例15: shareImageToQzone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public void shareImageToQzone(Activity activity, SKTencentContent content, final SKShare.ShareCallback callback) {
    mActivity = activity;
    this.callback = callback;
    Bundle bundle = new Bundle();
    bundle.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    bundle.putString(QzoneShare.SHARE_TO_QQ_TITLE, content.title);
    bundle.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, content.content);
    bundle.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, content.url);
    //bundle.putString(QzoneShare.SHARE_TO_QQ_IMAGE_LOCAL_URL, content.imageUrl);
    ArrayList<String> imageUrls = new ArrayList<>();
    imageUrls.add(content.imageUrl);
    bundle.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imageUrls);
    mTencent.shareToQzone(activity, bundle, iUiListener);
}
 
开发者ID:jhwing,项目名称:SKShare,代码行数:15,代码来源:SKQzoneShare.java


示例16: shareToQzeon

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
public void shareToQzeon(String title, String content, String shareUrl,
                         String imgUrl) {
    final Bundle params = new Bundle();
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, shareUrl);
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, content);
    params.putString(QzoneShare.SHARE_TO_QQ_APP_NAME, ShareManager.getAppName());
    ArrayList<String> list = new ArrayList<String>();
    if (!TextUtils.isEmpty(imgUrl)) {
        list.add(imgUrl);
    } else {
        if(!TextUtils.isEmpty(ShareManager.getDefShareImageUrl())){
            list.add(ShareManager.getDefShareImageUrl());
        }
    }
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, list);
    mTencent.shareToQzone(mActivity, params, new IUiListener() {

        @Override
        public void onCancel() {
        }

        @Override
        public void onError(UiError e) {
            String message = mActivity.getString(R.string.share_fail) + " " + e.errorMessage;
            Toast.makeText(mActivity, message, Toast.LENGTH_SHORT).show();
        }

        @Override
        public void onComplete(Object response) {

        }

    });
}
 
开发者ID:maoruibin,项目名称:ChinaShare,代码行数:37,代码来源:QQShareImpl.java


示例17: QQShareManager

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
QQShareManager(Context context) {
    mAppId = ShareSDK.getInstance().getQQAppId();
    mContext = context;
    if (!TextUtils.isEmpty(mAppId)) {
        mTencent = Tencent.createInstance(mAppId, context);
        mQQShare = new QQShare(context, mTencent.getQQToken());
        mQZoneShare = new QzoneShare(context, mTencent.getQQToken());
    }
}
 
开发者ID:henjue,项目名称:sharesdk,代码行数:10,代码来源:QQShareManager.java


示例18: share2QZone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
/**
 * 分享到QQ空间
 */
private void share2QZone() {
	ArrayList<String> imgList = new ArrayList<String>();
	//分享类型
	final Bundle params = new Bundle();
	params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
	switch (mJoke.getType()) {
	case Joke.TYPE_QUSHI:
		params.putString(QzoneShare.SHARE_TO_QQ_TITLE, context.getString(R.string.share_title_qushi));
		params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY,  mJoke.getContent().trim());
		//这里应该填写应用图标的图片
		imgList.add(appLogoUrl);
		params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgList);
		break;
	case Joke.TYPE_QUTU:
		params.putString(QzoneShare.SHARE_TO_QQ_TITLE, context.getString(R.string.share_title_qutu));
		params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY,  mJoke.getTitle());
		imgList.add(mJoke.getImgUrl());
		params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgList);
		break;
	case Joke.TYPE_MEITU:
		params.putString(QzoneShare.SHARE_TO_QQ_TITLE, context.getString(R.string.share_title_meitu));
		params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, mJoke.getTitle());
		imgList.add(mJoke.getImgUrl());
		params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgList);
		break;
	}
	params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, targetUrl + mJoke.getId());//必填
	App.mTencent.shareToQzone((Activity)context, params, iUiListener);
}
 
开发者ID:liuling07,项目名称:QiQuYing,代码行数:33,代码来源:SharePopWindow.java


示例19: shareToQzone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private static void shareToQzone(Activity activity, JokeBean jokeBean) {
    final Bundle params = new Bundle();
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, jokeBean.title);
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, buildJokeSummary(jokeBean.content));
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, APK_PAGE);

    // 二维码下载链接图片
    String qrPicture = PictureUtils.getLogoPicture();

    ArrayList<String> pictureList = new ArrayList<String>();
    if (!TextUtils.isEmpty(qrPicture)) {
        pictureList.add(qrPicture);
    }

    // 提供图片地址
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, pictureList);

    tencent.shareToQzone(activity, params, new IUiListener() {
        @Override
        public void onComplete(Object o) {
            shareSuccess();
            StatUtils.onShareEvent(StatUtils.EVENT_SHARE_JOKE, StatUtils.SHARE_QZONE);
        }

        @Override
        public void onError(UiError uiError) {
            shareFail();
        }

        @Override
        public void onCancel() {
        }
    });
}
 
开发者ID:CyanFlxy,项目名称:KnockKnock,代码行数:36,代码来源:ShareUtil.java


示例20: shareAppToQzone

import com.tencent.connect.share.QzoneShare; //导入依赖的package包/类
private static void shareAppToQzone(Activity activity) {
    final Bundle params = new Bundle();
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, baseContext.getString(R.string.app_name));
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, baseContext.getString(R.string.share_app_title));
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, APK_PAGE);

    // 二维码下载链接图片
    String qrPicture = PictureUtils.getLogoPicture();

    ArrayList<String> pictureList = new ArrayList<String>();
    if (!TextUtils.isEmpty(qrPicture)) {
        pictureList.add(qrPicture);
    }

    // 提供图片地址
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, pictureList);

    tencent.shareToQzone(activity, params, new IUiListener() {
        @Override
        public void onComplete(Object o) {
            shareSuccess();
            StatUtils.onShareEvent(StatUtils.EVENT_SHARE_APP, StatUtils.SHARE_QZONE);
        }

        @Override
        public void onError(UiError uiError) {
            shareFail();
        }

        @Override
        public void onCancel() {
        }
    });
}
 
开发者ID:CyanFlxy,项目名称:KnockKnock,代码行数:36,代码来源:ShareUtil.java



注:本文中的com.tencent.connect.share.QzoneShare类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CompletableEmitter类代码示例发布时间:2022-05-21
下一篇:
Java PlayerAchievementAwardedEvent类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap