移动开发平台 mPaaS 分享服务接口

By | 2021年4月23日

分享服务接口 ShareService

  
  1. public abstract class ShareService extends ExternalService {
  2. /**
  3. * 静默分享,只能指定一种分享类型,不会显示分享选择界面
  4. * @param content 分享内容
  5. * @param shareType 分享类型
  6. * @param biz biz
  7. */
  8. public abstract void silentShare(ShareContent content, final int shareType, final String biz);
  9. /**
  10. * 设置分享监听对象
  11. * @param listener 监听对象
  12. */
  13. public abstract void setShareActionListener(ShareActionListener listener);
  14. /**
  15. * 获取分享监听对象
  16. * @return 监听对象
  17. */
  18. public abstract ShareActionListener getShareActionListener();
  19. /**
  20. * 设置app的名字
  21. * @param name app名字
  22. */
  23. public abstract void setAppName(String name);
  24. /**
  25. * 初始化微信分享
  26. * @param appId 微信appId,在微信渠道中注册获取
  27. * @param appSecret 微信appSecret,在微信渠道中注册获取
  28. */
  29. public abstract void initWeixin(String appId, String appSecret);
  30. /**
  31. * 初始化微博分享
  32. * @param appId 微博appId,在微博渠道中注册获取
  33. * @param appSecret 微博appSecret,在微博渠道中注册获取
  34. * @param redirectUrl 微博分享重定向链接
  35. */
  36. public abstract void initWeiBo(String appId, String appSecret, String redirectUrl);
  37. /**
  38. * 初始化QZone分享
  39. * @param appId QZone appId,在QQ渠道中注册获取
  40. */
  41. public abstract void initQZone(String appId);
  42. /**
  43. * 初始化QQ分享
  44. * @param appId QQ appId,在QQ渠道中注册获取
  45. */
  46. public abstract void initQQ(String appId);
  47. /**
  48. * 初始化支付宝分享
  49. * @param appId 支付宝 appId,在支付宝渠道中注册获取
  50. */
  51. public abstract void initAlipayContact(String appId);
  52. /**
  53. * 初始化钉钉分享
  54. * @param appId 钉钉appId,在钉钉渠道中注册获取
  55. */
  56. public abstract void initDingDing(String appId);
  57. }

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

发表回复

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