本文整理汇总了Java中cn.sharesdk.tencent.qzone.QZone类的典型用法代码示例。如果您正苦于以下问题:Java QZone类的具体用法?Java QZone怎么用?Java QZone使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QZone类属于cn.sharesdk.tencent.qzone包,在下文中一共展示了QZone类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onResume
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
public void onResume() {
L.d(CategoryActy_v_1.class, "onResume-------------");
if (mShareComplete) {
if (mCurrPlatform.equals(SinaWeibo.NAME)) {
mOkSinaWeibo = true;
} else if (mCurrPlatform.equals(QZone.NAME)) {
mOkQzone = true;
} else if (mCurrPlatform.equals(WechatMoments.NAME)) {
mOkWechatMoments = true;
} else if (mCurrPlatform.equals(Wechat.NAME)) {
mOkWechat = true;
} else if (mCurrPlatform.equals(QQ.NAME)) {
mOkQQ = true;
}
if (isShared()) mBtnComplete.setText(R.string.m_category_v_1_share_link_btn_complete);
}
resetState();
}
开发者ID:isuhao,项目名称:QMark,代码行数:19,代码来源:ShareLinkViewHolder.java
示例2: onError
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onError(Platform platform, int action, Throwable e) {
L.e(CategoryActy_v_1.class, "[onError]platform:" + platform.getName());
mShareComplete = false;
if (action == Platform.ACTION_SHARE) {
if (platform.getName().equals(SinaWeibo.NAME)) {
if (e != null) {
SinaWeiboError error = new SinaWeiboError().fromJson(e.getMessage());
Toast.makeText(mContext, error.error_code == 20016 ?
R.string.d_m_edit_share_error_sina_weibo_update_too_fast_code_20016 :
R.string.d_m_edit_share_error_sina_weibo, Toast.LENGTH_LONG).show();
} else {
Toast.makeText(mContext, R.string.d_m_edit_share_error_sina_weibo, Toast.LENGTH_LONG).show();
}
} else if (platform.getName().equals(QZone.NAME)) {
//
} else if (platform.getName().equals(WechatMoments.NAME)) {
//
} else if (platform.getName().equals(Wechat.NAME)) {
//
} else if (platform.getName().equals(QQ.NAME)) {
//
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:27,代码来源:ShareLinkViewHolder.java
示例3: onCancel
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onCancel(Platform platform, int action) {
L.w(CategoryActy_v_1.class, "[onCancel]platform:" + platform.getName());
if (action == Platform.ACTION_SHARE) {
if (platform.getName().equals(SinaWeibo.NAME)) {
//
} else if (platform.getName().equals(QZone.NAME)) {
//
} else if (platform.getName().equals(WechatMoments.NAME)) {
//
} else if (platform.getName().equals(Wechat.NAME)) {
//
} else if (platform.getName().equals(QQ.NAME)) {
//
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:19,代码来源:ShareLinkViewHolder.java
示例4: onResume
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
public void onResume() {
L.d(EditActy.class, "onResume-------------");
if (mShareComplete) {
if (mCurrPlatform.equals(SinaWeibo.NAME)) {
mOkSinaWeibo.setVisibility(View.VISIBLE);
} else if (mCurrPlatform.equals(QZone.NAME)) {
mOkQzone.setVisibility(View.VISIBLE);
} else if (mCurrPlatform.equals(WechatMoments.NAME)) {
mOkWechatMoments.setVisibility(View.VISIBLE);
} else if (mCurrPlatform.equals(Wechat.NAME)) {
mOkWechat.setVisibility(View.VISIBLE);
} else if (mCurrPlatform.equals(QQ.NAME)) {
mOkQQ.setVisibility(View.VISIBLE);
}
}
resetState();
}
开发者ID:isuhao,项目名称:QMark,代码行数:18,代码来源:EditActy.java
示例5: onCancel
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onCancel(Platform platform, int action) {
L.w(EditActy.class, "[onCancel]platform:" + platform.getName());
//parseAction(action);
if (action == Platform.ACTION_SHARE) {
if (platform.getName().equals(SinaWeibo.NAME)) {
//
} else if (platform.getName().equals(QZone.NAME)) {
//
} else if (platform.getName().equals(WechatMoments.NAME)) {
//
} else if (platform.getName().equals(Wechat.NAME)) {
//
} else if (platform.getName().equals(QQ.NAME)) {
//
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:20,代码来源:EditActy.java
示例6: showShare
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
private void showShare() {
ShareSDK.initSDK(this);
OnekeyShare oks = new OnekeyShare();
//隐藏
oks.addHiddenPlatform(QQ.NAME);
oks.addHiddenPlatform(SinaWeibo.NAME);
oks.addHiddenPlatform(TencentWeibo.NAME);
oks.addHiddenPlatform(QZone.NAME);
oks.addHiddenPlatform(WechatFavorite.NAME);
oks.addHiddenPlatform(Facebook.NAME);
oks.addHiddenPlatform(Twitter.NAME);
oks.addHiddenPlatform(ShortMessage.NAME);
oks.disableSSOWhenAuthorize();
String packgeName = mTextView_Title.getText().toString();
if (!packgeName.isEmpty() && packgeName != "") {
oks.setTitle(packgeName);
mTitle = packgeName;
} else {
oks.setTitle(mTitle);
}
oks.setShareContentCustomizeCallback(new ShareContentCustomizeCallback() {
@Override
public void onShare(Platform platform, Platform.ShareParams paramsToShare) {
if (WechatMoments.NAME.equals(platform.getName())) {
paramsToShare.setTitle(summary);
}
}
});
oks.setText(summary);
// oks.setImagePath(mImageTemp+"/yyox.png"); //分享sdcard目录下的图片
oks.setImageUrl(CommonUtils.getBaseUrl()+"/app/share/images/share.jpg");
oks.setUrl(url + "?orderNo=" + searchNo + "&orderStatus=" + orderStatus + "&companyCode=" + companyCode + "&title=" + mTitle+"&customerId="+mCustomerId);
oks.show(this);
}
开发者ID:Zyj163,项目名称:yyox,代码行数:36,代码来源:OrderTrackingActivity.java
示例7: onClick
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@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;
}
}
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:38,代码来源:FragmentLogin.java
示例8: onClick
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onClick(View v) {
String imgPath = getAdvertImagePath();
if (imgPath != null) {
if (v == mBtnSinaWeibo) {
SinaWeiboShare sina = ShareSdk.share(mContext, SinaWeiboShare.class, mPlatformActionListener);
sina.shareTextImagePath(Share.getTextNotOverMax(sina, mShareText, Const.APP_SITE_URL), imgPath, 0.0f, 0.0f);
mCurrPlatform = SinaWeibo.NAME;
} else if (v == mBtnQzone) {
QZoneShare qzone = ShareSdk.share(mContext, QZoneShare.class, mPlatformActionListener);
//注意有空格和无空格的情况,不可随意修改
//qzone.shareTextImagePath("", Const.APP_SITE_URL, " ", bitmapPath, null, Const.APP_SITE_URL);
qzone.shareTextImagePath("", Const.APP_SITE_URL, Share.getTextNotOverMax(qzone, mShareText, null), imgPath, null, Const.APP_SITE_URL);
mCurrPlatform = QZone.NAME;
//不会正确回调,因此,只要调用成功即视为分享成功
//mPlatformActionListener.onComplete(ShareSdk.getPlatform(mContext, QZone.NAME), Platform.ACTION_SHARE, null);
} else if (v == mBtnWechatMoments) {
WechatMomentsShare wechatMoments = ShareSdk.share(mContext, WechatMomentsShare.class, mPlatformActionListener);
wechatMoments.shareWebPageWithText(Share.getTitleNotOverMax(wechatMoments, mShareText), "", imgPath, Const.APP_SITE_URL);
mCurrPlatform = WechatMoments.NAME;
//不跳页,且不会回调,但是会收到onPause(),只要调用成功即视为分享成功,那么只要在onResume()时认为成功即可
mShareComplete = true;
} else if (v == mBtnWechat) {
WechatShare wechat = ShareSdk.share(mContext, WechatShare.class, mPlatformActionListener);
wechat.shareWebPageWithText("", Share.getTextNotOverMax(wechat, mShareText, null), imgPath, Const.APP_SITE_URL);
mCurrPlatform = Wechat.NAME;
//不会正确回调,但会跳页,因此,只要调用成功即视为分享成功,同上
mShareComplete = true;
} else if (v == mBtnQQ) {
QQShare qq = ShareSdk.share(mContext, QQShare.class, mPlatformActionListener);
qq.shareTextImagePath("", Const.APP_SITE_URL, mShareText, imgPath);
mCurrPlatform = QQ.NAME;
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:36,代码来源:ShareLinkViewHolder.java
示例9: onComplete
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onComplete(Platform platform, int action, HashMap<String, Object> map) {
L.d(CategoryActy_v_1.class, "[onComplete]platform:" + platform.getName());
mShareComplete = true;
if (action == Platform.ACTION_SHARE) {
if (platform.getName().equals(SinaWeibo.NAME)) {
//Platform.isSSODisable()与是否跳客户端没关系
L.e(CategoryActy_v_1.class, "complete---------------SinaWeibo");
/* 启用了客户端分享,但是在打开客户端之前或者没有安装客户端而直接进行了微博分享都会回调本方法,
* 而我无法分辨这两种情况,没有相关的方法或返回参数。
* 但有一个办法:如果是打开客户端,则会先执行onPause(),再执行本方法。so...
*/
if(!mPaused) {
//不跳页,给来个Toast
Toast.makeText(mContext, R.string.d_m_edit_share_complete_sina_weibo, Toast.LENGTH_LONG).show();
mOkSinaWeibo = true;
resetState();
}
} else if (platform.getName().equals(QZone.NAME)) {
//正常跳页且正确回调,但统一放到onStart()
} else if (platform.getName().equals(WechatMoments.NAME)) {
//不跳页,且不会回调,但是会弹窗,因此会收到onPause()
L.e(CategoryActy_v_1.class, "complete---------------WechatMoments");
} else if (platform.getName().equals(Wechat.NAME)) {
//跳页,但不会正确回调,返回即视为发布成功
} else if (platform.getName().equals(QQ.NAME)) {
//会跳页,会正确回调,但是在跳页之前回调,这里等待跳页回来调用onStart()
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:32,代码来源:ShareLinkViewHolder.java
示例10: shareTextImagePath
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
/**
* 本地图片的图文分享
* @param title 标题(必填,不可为null,可以为"",会显示"来自xxx(site参数)的分享",可为多个空格则会不显示标题)
* @param titleUrl 标题超链接(必填)
* @param text 分享内容(必填[ShareSDK没说必填],不可为null,不可为"",不可为null,可为多个空格则会不显示)
* @param imgPath
* @param site 网站名称(选填[ShareSDK说必填],若为null或""则会用app名称作替换,多个空格则会显示空格如"来自 (空格)的分享")
* @param siteUrl 网站超链接(选填[ShareSDK说必填],其实没用,分享出去的所有超链接都是titleUrl)
*/
public void shareTextImagePath(String title, String titleUrl, String text, String imgPath, String site, String siteUrl) {
checkTitle(title);
checkText(text);
cn.sharesdk.tencent.qzone.QZone.ShareParams params = new cn.sharesdk.tencent.qzone.QZone.ShareParams();
params.title = title;
params.titleUrl = titleUrl;
params.text = text;
params.imagePath = imgPath;
params.site = site;
params.siteUrl = siteUrl;
params.comment = text;
share(params);
}
开发者ID:isuhao,项目名称:QMark,代码行数:23,代码来源:ShareSdk.java
示例11: shareTextImageUrl
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
/**
* 网络图片的图文分享
* @param title 标题(必填,不可为null,可以为"",会显示"来自xxx(site参数)的分享",可为多个空格则会不显示标题)
* @param titleUrl 标题超链接(必填)
* @param text 分享内容(必填[ShareSDK没说必填],不可为null,不可为"",不可为null,可为多个空格则会不显示)
* @param imgUrl
* @param site 网站名称(选填[ShareSDK说必填],若为null或""则会用app名称作替换,多个空格则会显示空格如"来自 (空格)的分享")
* @param siteUrl 网站超链接(选填[ShareSDK说必填],其实没用,分享出去的所有超链接都是titleUrl)
*/
public void shareTextImageUrl(String title, String titleUrl, String text, String imgUrl, String site, String siteUrl) {
checkTitle(title);
checkText(text);
cn.sharesdk.tencent.qzone.QZone.ShareParams params = new cn.sharesdk.tencent.qzone.QZone.ShareParams();
params.title = title;
params.titleUrl = titleUrl;
params.text = text;
params.imageUrl = imgUrl;
params.site = site;
params.siteUrl = siteUrl;
params.comment = text;
share(params);
}
开发者ID:isuhao,项目名称:QMark,代码行数:23,代码来源:ShareSdk.java
示例12: onError
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onError(Platform platform, int action, Throwable e) {
L.e(EditActy.class, "[onError]platform:" + platform.getName());
//parseAction(action);
mShareComplete = false;
if (action == Platform.ACTION_SHARE) {
if (platform.getName().equals(SinaWeibo.NAME)) {
if (e != null) {
SinaWeiboError error = new SinaWeiboError().fromJson(e.getMessage());
Toast.makeText(mContext, error.error_code == 20016 ?
R.string.d_m_edit_share_error_sina_weibo_update_too_fast_code_20016 :
R.string.d_m_edit_share_error_sina_weibo, Toast.LENGTH_LONG).show();
} else {
Toast.makeText(mContext, R.string.d_m_edit_share_error_sina_weibo, Toast.LENGTH_LONG).show();
}
} else if (platform.getName().equals(QZone.NAME)) {
//
} else if (platform.getName().equals(WechatMoments.NAME)) {
//
} else if (platform.getName().equals(Wechat.NAME)) {
//
} else if (platform.getName().equals(QQ.NAME)) {
//
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:28,代码来源:EditActy.java
示例13: onComplete
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onComplete(Platform platform, int action, HashMap<String, Object> map) {
L.d(EditActy.class, "[onComplete]platform:" + platform.getName());
//parseAction(action);
mShareComplete = true;
if (action == Platform.ACTION_SHARE) {
if (platform.getName().equals(SinaWeibo.NAME)) {
//Platform.isSSODisable()与是否跳客户端没关系
L.e(EditActy.class, "complete---------------SinaWeibo");
/* 启用了客户端分享,但是在打开客户端之前或者没有安装客户端而直接进行了微博分享都会回调本方法,
* 而我无法分辨这两种情况,没有相关的方法或返回参数。
* 但有一个办法:如果是打开客户端,则会先执行onPause(),再执行本方法。so...
*/
if(!mPaused) {
//不跳页,给来个Toast
Toast.makeText(mContext, R.string.d_m_edit_share_complete_sina_weibo, Toast.LENGTH_LONG).show();
mOkSinaWeibo.setVisibility(View.VISIBLE);
resetState();
}
} else if (platform.getName().equals(QZone.NAME)) {
//正常跳页且正确回调,但统一放到onStart()
//mOkQzone.setVisibility(View.VISIBLE);
} else if (platform.getName().equals(WechatMoments.NAME)) {
//不跳页,且不会回调,但是会弹窗,因此会收到onPause()
L.e(EditActy.class, "complete---------------WechatMoments");
//mOkWechatMoments.setVisibility(View.VISIBLE);
} else if (platform.getName().equals(Wechat.NAME)) {
//跳页,但不会正确回调,返回即视为发布成功
//mOkWechat.setVisibility(View.VISIBLE);
} else if (platform.getName().equals(QQ.NAME)) {
//会跳页,会正确回调,但是在跳页之前回调,这里等待跳页回来调用onStart()
//mOkQQ.setVisibility(View.VISIBLE);
}
}
}
开发者ID:isuhao,项目名称:QMark,代码行数:37,代码来源:EditActy.java
示例14: handleMessage
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@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;
}
}
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:28,代码来源:FragmentLogin.java
示例15: initSharePlatform
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
private void initSharePlatform()
{
sinaWeibo = ShareSDK.getPlatform(SinaWeibo.NAME);
qqZone = ShareSDK.getPlatform(QZone.NAME);
renren = ShareSDK.getPlatform(Renren.NAME);
email = ShareSDK.getPlatform(Email.NAME);
message = ShareSDK.getPlatform(ShortMessage.NAME);
sinaWeibo.setPlatformActionListener(this);
qqZone.setPlatformActionListener(this);
renren.setPlatformActionListener(this);
email.setPlatformActionListener(this);
message.setPlatformActionListener(this);
}
开发者ID:Rowandjj,项目名称:yitu,代码行数:15,代码来源:Settings.java
示例16: share_to_qzone
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
private void share_to_qzone()
{
cn.sharesdk.tencent.qzone.QZone.ShareParams sp = new cn.sharesdk.tencent.qzone.QZone.ShareParams();
sp.setText(SHARE_TEXT);
sp.setTitleUrl("http://www.cnsoftbei.com/");
sp.setTitle("�������");
sp.setSite("��Ϳ");
sp.setSiteUrl("http://www.cnsoftbei.com/");
qqZone = ShareSDK.getPlatform(QZone.NAME);
qqZone.setPlatformActionListener(this);
qqZone.share(sp);
}
开发者ID:Rowandjj,项目名称:yitu,代码行数:13,代码来源:Settings.java
示例17: onClick
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@Override
public void onClick(View view) {
shareByTencent(QZone.NAME);
}
开发者ID:g977284333,项目名称:KwPresent,代码行数:5,代码来源:ShareDialog.java
示例18: onClick
import cn.sharesdk.tencent.qzone.QZone; //导入依赖的package包/类
@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;
}
}
开发者ID:daimajia,项目名称:AnimeTaste,代码行数:62,代码来源:SettingActivity.java
注:本文中的cn.sharesdk.tencent.qzone.QZone类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论