本文整理汇总了Java中com.umeng.socialize.sso.UMQQSsoHandler.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java UMQQSsoHandler.setTitle方法的具体用法?Java UMQQSsoHandler.setTitle怎么用?Java UMQQSsoHandler.setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.umeng.socialize.sso.UMQQSsoHandler
的用法示例。
在下文中一共展示了UMQQSsoHandler.setTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shareToQQ
import com.umeng.socialize.sso.UMQQSsoHandler; //导入方法依赖的package包/类
protected void shareToQQ(SHARE_MEDIA media) {
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(),
Constants.QQ_APPID, Constants.QQ_APPKEY);
qqSsoHandler.setTargetUrl(getShareUrl());
qqSsoHandler.setTitle(getShareContent());
qqSsoHandler.addToSocialSDK();
mController.setShareContent(getShareContent());
mController.postShare(getActivity(), media, new SnsPostListener() {
@Override
public void onStart() {
AppContext.showToastShort(R.string.tip_start_share);
}
@Override
public void onComplete(SHARE_MEDIA arg0, int arg1,
SocializeEntity arg2) {
AppContext.showToastShort(R.string.tip_share_done);
}
});
}
示例2: shareToQQ
import com.umeng.socialize.sso.UMQQSsoHandler; //导入方法依赖的package包/类
protected void shareToQQ(SHARE_MEDIA media) {
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(),
Constants.QQ_APPID, Constants.QQ_APPKEY);
qqSsoHandler.setTargetUrl(getShareUrl());
qqSsoHandler.setTitle(getShareContent());
qqSsoHandler.addToSocialSDK();
mController.setShareContent(getShareContent());
mController.postShare(getActivity(), media, new SnsPostListener() {
@Override
public void onStart() {
AppContext.showToastShort(R.string.tip_start_share);
}
@Override
public void onComplete(SHARE_MEDIA arg0, int arg1,
SocializeEntity arg2) {
AppContext.showToastShort(R.string.tip_share_done);
}
});
}
示例3: UMQQSsoHandler
import com.umeng.socialize.sso.UMQQSsoHandler; //导入方法依赖的package包/类
private void 自带分享() {
// mSocialService.setShareContent(getString(R.string.sms_spread_text));
// mSocialService.setShareMedia(new UMImage(MainActivity.this, R.mipmap.ic_launcher));
// mSocialService.getConfig().removePlatform(SHARE_MEDIA.SINA, SHARE_MEDIA.TENCENT);
//
// // 添加微信平台
// UMWXHandler wxHandler = new UMWXHandler(MainActivity.this, "appId", "appSecret");
// wxHandler.addToSocialSDK();
// wxHandler.setTitle(getString(R.string.app_name));
// wxHandler.setTargetUrl(getString(R.string.sms_spread_url));
// // 添加微信朋友圈
// UMWXHandler wxCircleHandler = new UMWXHandler(MainActivity.this, "appId", "appSecret");
// wxCircleHandler.setToCircle(true);
// wxCircleHandler.setTitle(getString(R.string.app_name));
// wxCircleHandler.setTargetUrl(getString(R.string.sms_spread_url));
// wxCircleHandler.addToSocialSDK();
//参数1为当前Activity,参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(MainActivity.this, "APP ID",
"APP kEY");
qqSsoHandler.setTitle(getString(R.string.app_name));
qqSsoHandler.setTargetUrl(getString(R.string.sms_spread_url));
qqSsoHandler.addToSocialSDK();
//参数1为当前Activity,参数2为开发者在QQ互联申请的APP ID,参数3为开发者在QQ互联申请的APP kEY.
QZoneSsoHandler qZoneSsoHandler = new QZoneSsoHandler(MainActivity.this, "APP ID",
"APP kEY");
qZoneSsoHandler.setTargetUrl(getString(R.string.sms_spread_url));
qZoneSsoHandler.addToSocialSDK();
mSocialService.openShare(MainActivity.this, false);
}