本文整理汇总了Java中cn.sharesdk.system.text.ShortMessage类的典型用法代码示例。如果您正苦于以下问题:Java ShortMessage类的具体用法?Java ShortMessage怎么用?Java ShortMessage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ShortMessage类属于cn.sharesdk.system.text包,在下文中一共展示了ShortMessage类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showShare
import cn.sharesdk.system.text.ShortMessage; //导入依赖的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);
}
示例2: onClick
import cn.sharesdk.system.text.ShortMessage; //导入依赖的package包/类
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_sms://短信分享
showShare(true, ShortMessage.NAME);
break;
case R.id.btn_sina://新浪分享
showShare(true, SinaWeibo.NAME);
break;
case R.id.btn_tencent://腾讯分享
showShare(true, TencentWeibo.NAME);
break;
case R.id.btn_wechatmoment://朋友圈分享
showShare(true, WechatMoments.NAME);
break;
default:
break;
}
}
示例3: initSharePlatform
import cn.sharesdk.system.text.ShortMessage; //导入依赖的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);
}
示例4: share_to_message
import cn.sharesdk.system.text.ShortMessage; //导入依赖的package包/类
private void share_to_message()
{
cn.sharesdk.system.text.ShortMessage.ShareParams sp = new cn.sharesdk.system.text.ShortMessage.ShareParams();
sp.setText(SHARE_TEXT);
message = ShareSDK.getPlatform(ShortMessage.NAME);
message.setPlatformActionListener(this);
message.share(sp);
}