cn.sharesdk.tencent.qzone.QZone Java Examples
The following examples show how to use
cn.sharesdk.tencent.qzone.QZone.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FragmentLogin.java From BigApp_WordPress_Android with Apache License 2.0 | 5 votes |
@Override public void onClick(View v) { int vId = v.getId(); switch (vId) { case R.id.tv_regist: mCallBack.fragmentChanged(FragmentRegist.class.getSimpleName(), null, false); break; case R.id.tv_forgetpwd: //TODO // mCallBack.fragmentChanged(FragmentForgetPwd.class.getSimpleName(), null, false); break; case R.id.iv_wechat: ShareSDK.initSDK(mContext); authorize(ShareSDK.getPlatform(Wechat.NAME), "wechat"); break; case R.id.iv_qq: ShareSDK.initSDK(mContext); authorize(ShareSDK.getPlatform(QZone.NAME), "qq"); break; case R.id.iv_sina: ShareSDK.initSDK(mContext); authorize(ShareSDK.getPlatform(SinaWeibo.NAME), "sina"); break; case R.id.iv_close: getActivity().onBackPressed(); break; case R.id.btn_login: String userName = mEt_username.getText().toString(); String pwd = mEt_pwd.getText().toString(); if (TextUtils.isEmpty(userName) || TextUtils.isEmpty(pwd)) { ZToastUtils.toastMessage(mContext.getApplicationContext(), R.string.z_toast_name_pwd_not_null); return; } login(userName, pwd); break; } }
Example #2
Source File: FragmentLogin.java From BigApp_WordPress_Android with Apache License 2.0 | 5 votes |
@Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case 0: Platform platform = (Platform) msg.obj; String platformName = ""; if (Wechat.NAME.equals(platform.getName())) { platformName = "wechat"; } else if (QZone.NAME.equals(platform.getName())) { platformName = "qq"; } else if (SinaWeibo.NAME.equals(platform.getName())) { platformName = "sina"; } checkBind(platform.getDb(), platformName); break; case 1: ZToastUtils.toastMessage(mContext.getApplicationContext(), getString(R.string.wechat_client_inavailable)); break; case 2: ZToastUtils.toastMessage(mContext.getApplicationContext(), getString(R.string.v_toast_third_sso_fail)); break; case 3: ZToastUtils.toastMessage(mContext.getApplicationContext(), getString(R.string.v_toast_third_sso_cancel)); break; } }
Example #3
Source File: PlatformShareManager.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareFile(String name, Activity activity) { if (name.equals(Dropbox.NAME)) { DropboxShare dropboxShare = new DropboxShare(platformActionListener); dropboxShare.shareFile(); } else if (name.equals(QZone.NAME)) { QQZoneShare qqZoneShare = new QQZoneShare(platformActionListener); qqZoneShare.shareVideo(); } else if (name.equals(Wechat.NAME)) { WechatShare wechatShare = new WechatShare(platformActionListener); wechatShare.shareFile(); } else if (name.equals(WechatFavorite.NAME)) { WechatFavoriteShare wechatFavoriteShare = new WechatFavoriteShare(platformActionListener); wechatFavoriteShare.shareFile(); } else if (name.equals(Wework.NAME)) { WeworkShare weworkShare = new WeworkShare(platformActionListener); weworkShare.shareFile(activity); } else { Platform platform = ShareSDK.getPlatform(name); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle()); shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath()); shareParams.setShareType(Platform.SHARE_FILE); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); } }
Example #4
Source File: PlatformShareManager.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareQQMiniProgram(String name, Activity activity) { if (name.equals(QQ.NAME)) { QQShare qqShare = new QQShare(platformActionListener); qqShare.shareQQMiniProgram(); } if (name.equals(QZone.NAME)) { QQZoneShare qqZoneShare = new QQZoneShare(platformActionListener); qqZoneShare.shareQQMiniProgram(activity); } }
Example #5
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText("Share SDK QQ空间文字分享"); /*shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle()); shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl()); shareParams.setSite(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setSiteUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());*/ platform.setPlatformActionListener(platformActionListener); shareParams.setShareType(Platform.SHARE_TEXT); platform.share(shareParams); }
Example #6
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareWebPager(){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(LINK_TEXT); shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle()); shareParams.setUrl(LINK_URL); shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl()); shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl()); platform.setPlatformActionListener(platformActionListener); shareParams.setShareType(Platform.SHARE_WEBPAGE); platform.share(shareParams); }
Example #7
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareImage(){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath()); shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl()); shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic()); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setShareTencentWeibo(false); shareParams.setShareType(Platform.SHARE_IMAGE); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); }
Example #8
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareVideo(){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath()); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl()); shareParams.setShareType(Platform.SHARE_VIDEO); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); }
Example #9
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(PlatformActionListener mListener){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle()); shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl()); shareParams.setShareType(Platform.SHARE_TEXT); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example #10
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareWebPager(PlatformActionListener mListener){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle()); shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl()); shareParams.setShareType(Platform.SHARE_WEBPAGE); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example #11
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareImage(PlatformActionListener mListener){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath()); shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl()); shareParams.setShareType(Platform.SHARE_IMAGE); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example #12
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareVideo(PlatformActionListener mListener){ Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath()); shareParams.setShareType(Platform.SHARE_VIDEO); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example #13
Source File: QQZoneShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareQQMiniProgram(Activity activity) { Platform platform = ShareSDK.getPlatform(QZone.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText("QQ小程序"); shareParams.setTitle("QQ互联"); shareParams.setTitleUrl("http://www.qq.com/"); shareParams.setImageUrl("http://www.3wyu.com/wp-content/uploads/6e0eaf15gy1fvr5tnm2dfj20f108gtad.jpg"); shareParams.setShareType(Platform.QQ_MINI_PROGRAM); shareParams.setQQMiniProgramAppid("1108318575"); shareParams.setQQMiniProgramPath("page/share/index.html?share_name=QQ%E9%9F%B3%E4%B9%90&share_key=5aIqFGg&from=disk"); shareParams.setQQMiniProgramType(""); ShareSDK.setActivity(activity); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); }
Example #14
Source File: ShareUtil.java From CatchPiggy with GNU General Public License v3.0 | 4 votes |
public static void shareToQZone(Context context, boolean isRequestHelp, String message) { OnekeyShare onekeyShare = getData(context, isRequestHelp, message); onekeyShare.setPlatform(QZone.NAME); onekeyShare.show(context); }
Example #15
Source File: PlatformAuthorizeUserInfoManager.java From ShareSDK-for-Android with MIT License | 4 votes |
public void qqZoneAuthorize() { Platform qqZone = ShareSDK.getPlatform(QZone.NAME); doAuthorize(qqZone); }
Example #16
Source File: SettingActivity.java From AnimeTaste with MIT License | 4 votes |
@Override public void onClick(View v) { switch (v.getId()) { case R.id.only_for_wifi: break; case R.id.use_hd: break; case R.id.suggestion: Intent intent = new Intent(mContext, FeedbackActivity.class); startActivity(intent); break; case R.id.recommend: Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getText(R.string.share_title)); shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, getText(R.string.share_app_body)); startActivity(Intent.createChooser(shareIntent, getText(R.string.share_via))); break; case R.id.focus_us: mWeibo = new SinaWeibo(mContext); mWeibo.setPlatformActionListener(this); mWeibo.authorize(); break; case R.id.cancel_auth: ShareSDK.getPlatform(mContext, SinaWeibo.NAME).removeAccount(); ShareSDK.getPlatform(mContext, QZone.NAME).removeAccount(); mSharedPreferences.edit().remove("login").commit(); MobclickAgent.onEvent(mContext, "logout"); Toast.makeText(mContext, R.string.logout_success, Toast.LENGTH_SHORT).show(); break; case R.id.rate_for_us: Uri uri = Uri.parse("market://details?id=" + mContext.getPackageName()); Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri); try { startActivity(goToMarket); MobclickAgent.onEvent(mContext, "rate"); } catch (ActivityNotFoundException e) { Toast.makeText(mContext, R.string.can_not_open_market, Toast.LENGTH_SHORT).show(); } break; case R.id.clear_cache: new Thread(){ @Override public void run() { super.run(); CacheUtils.deleteCache(mContext); } }.start(); Toast.makeText(mContext,R.string.clear_ok,Toast.LENGTH_SHORT).show(); break; default: break; } }