當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。