Android Open Source - ShareSDKShareDifMsgDemo-Android Share Content Customize Demo






From Project

Back to project page ShareSDKShareDifMsgDemo-Android.

License

The source code is released under:

MIT License

If you think the Android project ShareSDKShareDifMsgDemo-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * ????:http://www.mob.com/*from  w  w  w. j  a  v a  2 s .  c  o  m*/
 * ?????QQ: 4006852216
 * ????:ShareSDK   ??????????????????????????????????????????????????????????????????????????????24??????????
 *
 * Copyright (c) 2013? mob.com. All rights reserved.
 */

package cn.sharesdk.demo.tpl;

import cn.sharesdk.framework.Platform;
import cn.sharesdk.framework.Platform.ShareParams;
import cn.sharesdk.onekeyshare.ShareContentCustomizeCallback;

/**
 * ??????????????????????????????????????
 *??????????Twitter?????????????????
 *????{@link DemoPage#showShare(boolean, String)}??
 *?????
 *http://wiki.mob.com/Android_%E5%BF%AB%E6%8D%B7%E5%88%86%E4%BA%AB#.E4.B8.BA.E4.B8.8D.E5.90.8C.E5.B9.B3.E5.8F.B0.E5.AE.9A.E4.B9.89.E5.B7.AE.E5.88.AB.E5.8C.96.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9
 */
public class ShareContentCustomizeDemo implements ShareContentCustomizeCallback {

  public void onShare(Platform platform, ShareParams paramsToShare) {

    String text = platform.getContext().getString(R.string.share_title);
    if ("WechatMoments".equals(platform.getName())) {
      // ??twitter??????text???????????
      // ??twitter?????????????????????
      text += platform.getContext().getString(R.string.share_to_wechatmoment);
      paramsToShare.setText(text);
    }else if("SinaWeibo".equals(platform.getName())){
      text += platform.getContext().getString(R.string.share_to_sina);
      paramsToShare.setText(text);      
    }else if("TencentWeibo".equals(platform.getName())){
      text += platform.getContext().getString(R.string.share_to_tencent);
      paramsToShare.setText(text);      
    }else if("ShortMessage".equals(platform.getName())){
      text += platform.getContext().getString(R.string.share_to_sms);
      paramsToShare.setText(text);
      
    }
  }

}




Java Source Code List

cn.sharesdk.demo.tpl.MainActivity.java
cn.sharesdk.demo.tpl.ShareContentCustomizeDemo.java
cn.sharesdk.demo.tpl.wxapi.WXEntryActivity.java
cn.sharesdk.onekeyshare.CustomerLogo.java
cn.sharesdk.onekeyshare.EditPage.java
cn.sharesdk.onekeyshare.FollowList.java
cn.sharesdk.onekeyshare.OnekeyShare.java
cn.sharesdk.onekeyshare.PicViewer.java
cn.sharesdk.onekeyshare.PlatformGridView.java
cn.sharesdk.onekeyshare.Shake2Share.java
cn.sharesdk.onekeyshare.ShareContentCustomizeCallback.java
cn.sharesdk.onekeyshare.ShareCore.java