移动开发平台 mPaaS 分享类型接口

By | 2021年4月23日

ShareType 分享类型接口:

  
  1. public class ShareType {
  2. /**
  3. * 短信
  4. */
  5. public static final int SHARE_TYPE_SMS = 2;
  6. /**
  7. * 微博
  8. */
  9. public static final int SHARE_TYPE_WEIBO = 4;
  10. /**
  11. * 微信好友
  12. */
  13. public static final int SHARE_TYPE_WEIXIN = 8;
  14. /**
  15. * 微信朋友圈
  16. */
  17. public static final int SHARE_TYPE_WEIXIN_TIMELINE = 16;
  18. /**
  19. * 复制链接
  20. */
  21. public static final int SHARE_TYPE_LINKCOPY = 32;
  22. /**
  23. * QQ空间动态
  24. */
  25. public static final int SHARE_TYPE_QZONE = 256;
  26. /**
  27. * QQ好友
  28. */
  29. public static final int SHARE_TYPE_QQ = 512;
  30. /**
  31. * 联系人
  32. */
  33. public static final int SHARE_TYPE_CONTACT = 1024;
  34. /**
  35. * 我的生活
  36. */
  37. public static final int SHARE_TYPE_CONTACT_TIMELINE = 2048;
  38. /**
  39. * 钉钉
  40. */
  41. public static final int SHARE_TYPE_DINGDING = 4096;
  42. /**
  43. * 圈子
  44. */
  45. public static final int SHARE_TYPE_GROUP = 8192;
  46. /**
  47. * 所有
  48. */
  49. public static final int SHARE_TYPE_ALL = 65535;
  50. }

注意事项

  • 在使用 微信 分享纯文本的时候,需要在 分享内容接口sharecontent 类中,把 Url、Image、和 ImgUrl 置为 null。

        
    1. shareContent.setUrl(null);
    2. shareContent.setImage(null);
    3. shareContent.setImgUrl(null);
  • 在使用 微博 分享纯文本的时候,需要在 分享内容接口ShareContent 类中,把 Url 置为空格,Image、ImgUrl 置为 null。

        
    1. shareContent.setUrl(" ");
    2. shareContent.setImage(null);
    3. shareContent.setImgUrl(null);

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注