当前位置: 首页>>代码示例>>Java>>正文


Java ShortMessage类代码示例

本文整理汇总了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);
    }
 
开发者ID:Zyj163,项目名称:yyox,代码行数:36,代码来源:OrderTrackingActivity.java

示例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;
	}
}
 
开发者ID:MobClub,项目名称:ShareSDKShareDifMsgDemo-Android,代码行数:20,代码来源:MainActivity.java

示例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);
}
 
开发者ID:Rowandjj,项目名称:yitu,代码行数:15,代码来源:Settings.java

示例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);
}
 
开发者ID:Rowandjj,项目名称:yitu,代码行数:9,代码来源:Settings.java


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