QDShareManager.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // using System.Collections;
  2. // using cn.sharesdk.unity3d;
  3. // using GFGGame.Launcher;
  4. // using UnityEngine;
  5. //
  6. // namespace GFGGame
  7. // {
  8. // public class QDShareManager : SingletonBase<QDShareManager>
  9. // {
  10. // public void Init()
  11. // {
  12. // QDShareManagerInit.Instance.shareSDKListener = new ShareSDKListener();
  13. // }
  14. //
  15. // //回传用户隐私授权结果
  16. //
  17. // /// <summary>
  18. // /// 构造分享信息 SetShareType
  19. // /// </summary>
  20. // /// <param name="text">分享的文字</param>
  21. // /// <param name="imageUrl">iOS平台,本地以及网络图片都使用此方法</param>
  22. // /// <param name="imageUrlArr">分享一组图片</param>
  23. // /// <param name="title">分享的标题</param>
  24. // /// <param name="titleUrl">标题的网络链接(QQ和QQ空间使用 )</param>
  25. // /// <param name="site"></param>
  26. // /// <param name="siteUrl"></param>
  27. // /// <param name="url">分享的链接(微信,微博,易信,Facebook等平台)</param>
  28. // /// <param name="comment"></param>
  29. // /// <param name="musicUrl"></param>
  30. // /// <param name="shareType">分享类型(微信,易信) ContentType</param>
  31. // /// <returns></returns>
  32. // public ShareContent NewStructureShareContent(string text, string imageUrl, string[] imageUrlArr, string title,
  33. // string titleUrl,
  34. // string site,
  35. // string siteUrl,
  36. // string url,
  37. // string comment,
  38. // string musicUrl, int shareType)
  39. // {
  40. // ShareContent content = new ShareContent();
  41. // content.SetText(text);
  42. // content.SetImageUrl(imageUrl);
  43. // content.SetImageArray(imageUrlArr);
  44. // content.SetTitle(title);
  45. // content.SetTitleUrl(titleUrl);
  46. // content.SetSite(site);
  47. // content.SetSiteUrl(siteUrl);
  48. // content.SetUrl(url);
  49. // content.SetComment(comment);
  50. // content.SetMusicUrl(musicUrl);
  51. // content.SetShareType(shareType);
  52. // return content;
  53. // }
  54. //
  55. // /// <summary>
  56. // /// 回传用户隐私授权结果给sdk
  57. // /// </summary>
  58. // /// <param name="granted"></param>
  59. // public void SubmitPolicyGrantResult(bool granted = true)
  60. // {
  61. // QDShareManagerInit.Instance.mobsdk.submitPolicyGrantResult(granted);
  62. // }
  63. //
  64. // //通过分享菜单分享
  65. // public int ShowPlatformList(PlatformType[] platforms, ShareContent shareContent)
  66. // {
  67. // return QDShareManagerInit.Instance.shareSDK.ShowPlatformList(platforms, shareContent, 100, 100);
  68. // }
  69. //
  70. // //直接通过编辑界面分享
  71. // public int ShowShareContentEditor(PlatformType platformType, ShareContent shareContent)
  72. // {
  73. // return QDShareManagerInit.Instance.shareSDK.ShowShareContentEditor(platformType, shareContent);
  74. // }
  75. //
  76. // //直接分享
  77. // public int ShareContent(PlatformType platformType, ShareContent shareContent)
  78. // {
  79. // return QDShareManagerInit.Instance.shareSDK.ShareContent(platformType, shareContent);
  80. // }
  81. // }
  82. //
  83. // public class ShareSDKListener : IShareSDKListener
  84. // {
  85. // public void OnAuthResult(int reqID, ResponseState state, PlatformType type, Hashtable result)
  86. // {
  87. // Debug.Log($"OnAuthResult");
  88. // }
  89. //
  90. // public void OnGetUserInfoResult(int reqID, ResponseState state, PlatformType type,
  91. // Hashtable result)
  92. // {
  93. // Debug.Log($"OnGetUserInfoResult");
  94. // }
  95. //
  96. // public void OnShareResult(int reqID, ResponseState state, PlatformType type, Hashtable result)
  97. // {
  98. // if (state == ResponseState.Success)
  99. // {
  100. // ShareRecordSProxy.ReqShareRecord().Coroutine();
  101. // }
  102. //
  103. // Debug.Log($"OnShareResult state:" + state);
  104. // }
  105. //
  106. // public void OnGetFriendsResult(int reqID, ResponseState state, PlatformType type,
  107. // Hashtable result)
  108. // {
  109. // Debug.Log($"OnGetFriendsResult");
  110. // }
  111. //
  112. // public void OnFollowFriendResult(int reqID, ResponseState state, PlatformType type,
  113. // Hashtable result)
  114. // {
  115. // Debug.Log($"OnFollowFriendResult");
  116. // }
  117. //
  118. // public void OnIsClientValidForAndroidResult(int reqID, ResponseState state, PlatformType type,
  119. // Hashtable result)
  120. // {
  121. // Debug.Log($"OnFollowFriendResult");
  122. // }
  123. // }
  124. // }