{"id":107851,"date":"2026-09-20T12:25:00","date_gmt":"2026-09-20T04:25:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/107851.html"},"modified":"2026-09-20T12:25:00","modified_gmt":"2026-09-20T04:25:00","slug":"harmonyos-7-share-kit-shareextensionability-%e5%ae%9e%e6%88%98%ef%bc%9a%e7%b3%bb%e7%bb%9f%e5%88%86%e4%ba%ab%e9%9d%a2%e6%9d%bf%e3%80%81%e6%95%b0%e6%8d%ae%e6%8e%a5%e6%94%b6%e4%b8%8e%e8%b7%a8%e5%ba%94","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/107851.html","title":{"rendered":"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c"},"content":{"rendered":"<p>\u628a\u5185\u5bb9\u5206\u4eab\u51fa\u53bb\u5bb9\u6613&#xff0c;\u628a\u522b\u4eba\u5206\u4eab\u8fc7\u6765\u7684\u5185\u5bb9\u6b63\u786e\u63a5\u4f4f\u624d\u662f\u771f\u9ebb\u70e6\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920042457-6aaf60195f348.jpg\" alt=\"\u6587\u7ae0\u5c01\u9762\" \/><\/p>\n<p>\u505a\u7b14\u8bb0\u5e94\u7528\u7684\u65f6\u5019&#xff0c;\u6700\u5f00\u59cb\u53ea\u505a\u4e86&#034;\u5206\u4eab\u51fa\u53bb&#034;&#xff1a;\u5199\u5b8c\u7b14\u8bb0\u70b9\u5206\u4eab&#xff0c;\u628a\u6587\u672c\u548c\u56fe\u7247\u4f20\u7ed9\u5176\u4ed6\u5e94\u7528\u3002\u8fd9\u4e2a\u529f\u80fd\u5f88\u7b80\u5355&#xff0c;\u8c03\u7528 Share Kit \u7684 API \u5c31\u5b8c\u4e8b\u4e86\u3002<\/p>\n<p>\u540e\u6765\u7528\u6237\u63d0\u9700\u6c42&#xff1a;\u80fd\u4e0d\u80fd\u5728\u76f8\u518c\u91cc\u9009\u4e00\u5f20\u56fe&#xff0c;\u76f4\u63a5\u5206\u4eab\u5230\u6211\u4eec\u7684\u7b14\u8bb0\u5e94\u7528\u91cc&#xff1f;\u8fd9\u65f6\u5019\u624d\u53d1\u73b0&#xff0c;&#034;\u63a5\u6536\u5206\u4eab&#034;\u6bd4&#034;\u5206\u4eab\u51fa\u53bb&#034;\u9ebb\u70e6\u591a\u4e86\u2014\u2014\u8981\u914d\u7f6e\u63a5\u6536\u7c7b\u578b\u3001\u8981\u89e3\u6790\u8de8\u5e94\u7528\u4f20\u8fc7\u6765\u7684\u6570\u636e\u3001\u8981\u5904\u7406\u5404\u79cd\u5f02\u5e38\u60c5\u51b5\u3001\u8fd8\u8981\u7ba1\u7406\u5206\u4eab\u9875\u9762\u7684\u751f\u547d\u5468\u671f\u3002<\/p>\n<p>\u8fd9\u7bc7\u5c31\u6cbf\u7740&#034;\u4e00\u5f20\u56fe\u7247\u4ece\u76f8\u518c\u8dd1\u5230\u7b14\u8bb0\u5e94\u7528&#034;\u8fd9\u6761\u94fe\u8def&#xff0c;\u628a\u6574\u4e2a\u5206\u4eab\u63a5\u6536\u6d41\u7a0b\u62c6\u6e05\u695a\u3002<\/p>\n<h3>\u4e00\u3001\u4e00\u5f20\u56fe\u7247\u7684\u8de8\u5e94\u7528\u65c5\u7a0b<\/h3>\n<p>\u5148\u628a\u6574\u4e2a\u94fe\u8def\u7406\u4e00\u904d&#xff1a;<\/p>\n<p>\u76f8\u518c\u5e94\u7528<br \/>\n  \u2193 \u8c03\u7528\u7cfb\u7edf\u5206\u4eab<br \/>\n\u7cfb\u7edf\u5206\u4eab\u9762\u677f<br \/>\n  \u2193 \u7528\u6237\u9009\u62e9\u7b14\u8bb0\u5e94\u7528<br \/>\n\u7b14\u8bb0\u5e94\u7528 ShareExtensionAbility<br \/>\n  \u2193 \u63a5\u6536 SharedData<br \/>\n\u89e3\u6790\u6570\u636e \u2192 \u4fdd\u5b58\u56fe\u7247 \u2192 \u521b\u5efa\u7b14\u8bb0<\/p>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u60f3\u6210&#034;\u5bc4\u5feb\u9012&#034;&#xff1a;<\/p>\n<ul>\n<li>\u53d1\u9001\u65b9\u628a\u5185\u5bb9\u6253\u5305\u6210 SharedData&#xff1b;<\/li>\n<li>\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u662f\u5feb\u9012\u516c\u53f8&#xff0c;\u8d1f\u8d23\u8def\u7531&#xff1b;<\/li>\n<li>\u63a5\u6536\u65b9\u7684 ShareExtensionAbility \u662f\u6536\u4ef6\u4eba&#xff0c;\u8d1f\u8d23\u62c6\u5305\u3001\u68c0\u67e5\u3001\u5904\u7406\u3002<\/li>\n<\/ul>\n<h3>\u4e8c\u3001ShareExtensionAbility \u662f\u5e72\u4ec0\u4e48\u7684<\/h3>\n<p>ShareExtensionAbility \u57fa\u4e8e UIExtensionAbility&#xff0c;\u5b83\u7684\u4f5c\u7528\u5c31\u662f\u8ba9\u4f60\u7684\u5e94\u7528\u51fa\u73b0\u5728\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u91cc&#xff0c;\u5e76\u4e14\u80fd\u5904\u7406\u5176\u4ed6\u5e94\u7528\u4f20\u8fc7\u6765\u7684\u5206\u4eab\u5185\u5bb9\u3002<\/p>\n<table>\n<tr>\u89d2\u8272\u804c\u8d23<\/tr>\n<tbody>\n<tr>\n<td>\u53d1\u9001\u65b9\u5e94\u7528<\/td>\n<td>\u628a\u5185\u5bb9\u6253\u5305\u6210 SharedData&#xff0c;\u8c03\u7528\u7cfb\u7edf\u5206\u4eab<\/td>\n<\/tr>\n<tr>\n<td>\u7cfb\u7edf\u5206\u4eab\u9762\u677f<\/td>\n<td>\u5c55\u793a\u53ef\u63a5\u6536\u7684\u5e94\u7528\u5217\u8868&#xff0c;\u8def\u7531\u5206\u4eab\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>ShareExtensionAbility&#xff08;\u63a5\u6536\u65b9&#xff09;<\/td>\n<td>\u63a5\u6536 SharedData&#xff0c;\u89e3\u6790\u6570\u636e&#xff0c;\u5904\u7406\u4e1a\u52a1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f88\u591a\u4eba\u53ea\u5b9e\u73b0\u4e86&#034;\u5206\u4eab\u51fa\u53bb&#034;&#xff0c;\u6ca1\u5b9e\u73b0&#034;\u63a5\u6536\u5206\u4eab&#034;\u3002\u7ed3\u679c\u5c31\u662f\u4f60\u7684\u5e94\u7528\u5728\u5206\u4eab\u5217\u8868\u91cc\u6839\u672c\u770b\u4e0d\u5230&#xff0c;\u56e0\u4e3a\u4f60\u6839\u672c\u6ca1\u6ce8\u518c ShareExtensionAbility\u3002<\/p>\n<h3>\u4e09\u3001UTD \u7c7b\u578b\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u91cd\u8981<\/h3>\n<p>\u5206\u4eab\u7684\u6570\u636e\u4e0d\u662f\u968f\u4fbf\u4f20\u7684&#xff0c;\u8981\u6709\u7c7b\u578b\u6807\u8bc6\u3002\u8fd9\u4e2a\u7c7b\u578b\u5c31\u662f UTD&#xff08;Uniform Type Description&#xff09;\u3002<\/p>\n<table>\n<tr>UTD \u7c7b\u578b\u5bf9\u5e94\u5185\u5bb9<\/tr>\n<tbody>\n<tr>\n<td>text\/plain<\/td>\n<td>\u7eaf\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td>image\/jpeg<\/td>\n<td>JPEG \u56fe\u7247<\/td>\n<\/tr>\n<tr>\n<td>image\/png<\/td>\n<td>PNG \u56fe\u7247<\/td>\n<\/tr>\n<tr>\n<td>file\/*<\/td>\n<td>\u901a\u7528\u6587\u4ef6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4f60\u8981\u63a5\u6536\u4ec0\u4e48\u7c7b\u578b\u7684\u6570\u636e&#xff0c;\u5c31\u8981\u5728 module.json5 \u91cc\u914d\u7f6e\u5bf9\u5e94\u7684 UTD \u7c7b\u578b\u3002\u914d\u7f6e\u9519\u4e86&#xff0c;\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u91cc\u5c31\u4e0d\u4f1a\u51fa\u73b0\u4f60\u7684\u5e94\u7528&#xff0c;\u6216\u8005\u51fa\u73b0\u4e86\u4f46\u6536\u4e0d\u5230\u5bf9\u5e94\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898&#xff1a; \u914d\u7f6e\u5e94\u7528\u53ef\u63a5\u6536\u7684\u5206\u4eab\u7c7b\u578b\u3002<br \/>\n\u6587\u4ef6&#xff1a; entry\/src\/main\/module.json5<br \/>\n\u7528\u9014&#xff1a; \u6ce8\u518c ShareExtensionAbility \u63a5\u6536\u7c7b\u578b<br \/>\n\u63a5\u5165\u4f4d\u7f6e&#xff1a; ExtensionAbility \u914d\u7f6e<\/p>\n<p>&#034;extensionAbilities&#034;: [<br \/>\n  {<br \/>\n    &#034;name&#034;: &#034;ShareReceiverAbility&#034;,<br \/>\n    &#034;type&#034;: &#034;shareReceiver&#034;,<br \/>\n    &#034;metadata&#034;: {<br \/>\n      &#034;utd&#034;: [&#034;text\/plain&#034;, &#034;image\/jpeg&#034;, &#034;image\/png&#034;],<br \/>\n      &#034;maxFileSupported&#034;: 20<br \/>\n    }<br \/>\n  }<br \/>\n]<\/p>\n<p>\u8fd9\u91cc\u914d\u7f6e\u4e86\u53ef\u4ee5\u63a5\u6536\u6587\u672c\u3001JPEG\u3001PNG \u4e09\u79cd\u7c7b\u578b&#xff0c;\u6700\u591a\u652f\u6301 20 \u4e2a\u6587\u4ef6\u3002maxFileSupported \u5f88\u91cd\u8981\u2014\u2014\u8d85\u8fc7\u8fd9\u4e2a\u6570\u91cf&#xff0c;\u7cfb\u7edf\u5c31\u4e0d\u4f1a\u628a\u4f60\u7684\u5e94\u7528\u663e\u793a\u5728\u5206\u4eab\u5217\u8868\u91cc\u4e86\u3002<\/p>\n<h3>\u56db\u3001\u6536\u5230\u6570\u636e\u4e4b\u540e\u600e\u4e48\u89e3\u6790<\/h3>\n<p>\u7528\u6237\u9009\u4e86\u4f60\u7684\u5e94\u7528\u4e4b\u540e&#xff0c;ShareExtensionAbility \u7684 onSessionCreate \u4f1a\u88ab\u8c03\u7528&#xff0c;\u91cc\u9762\u5e26\u7740\u4f20\u8fc7\u6765\u7684 SharedData\u3002<\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898&#xff1a; \u89e3\u6790\u63a5\u6536\u5230\u7684\u5206\u4eab\u6570\u636e\u3002<br \/>\n\u6587\u4ef6&#xff1a; ShareReceiverAbility.ets<br \/>\n\u7528\u9014&#xff1a; \u63a5\u6536\u5e76\u5904\u7406\u5206\u4eab\u5185\u5bb9<br \/>\n\u63a5\u5165\u4f4d\u7f6e&#xff1a; onSessionCreate \u751f\u547d\u5468\u671f<\/p>\n<p><span class=\"token keyword\">import<\/span> ShareExtensionAbility <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;ohos.app.ability.ShareExtensionAbility&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> Want <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;ohos.app.ability.Want&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">export<\/span> <span class=\"token keyword\">default<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">ShareReceiver<\/span> <span class=\"token keyword\">extends<\/span> <span class=\"token class-name\">ShareExtensionAbility<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token function\">onSessionCreate<\/span><span class=\"token punctuation\">(<\/span>want<span class=\"token operator\">:<\/span> Want<span class=\"token punctuation\">,<\/span> session<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> sharedData <span class=\"token operator\">&#061;<\/span> want<span class=\"token operator\">?.<\/span>parameters<span class=\"token operator\">?.<\/span>sharedData<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> records <span class=\"token operator\">&#061;<\/span> sharedData<span class=\"token operator\">?.<\/span>records <span class=\"token operator\">||<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> record <span class=\"token keyword\">of<\/span> records<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>record<span class=\"token punctuation\">.<\/span>utd <span class=\"token operator\">&#061;&#061;&#061;<\/span> <span class=\"token string\">&#039;image\/jpeg&#039;<\/span> <span class=\"token operator\">||<\/span> record<span class=\"token punctuation\">.<\/span>utd <span class=\"token operator\">&#061;&#061;&#061;<\/span> <span class=\"token string\">&#039;image\/png&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">saveImage<\/span><span class=\"token punctuation\">(<\/span>record<span class=\"token punctuation\">.<\/span>uri<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>record<span class=\"token punctuation\">.<\/span>utd <span class=\"token operator\">&#061;&#061;&#061;<\/span> <span class=\"token string\">&#039;text\/plain&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">saveText<\/span><span class=\"token punctuation\">(<\/span>record<span class=\"token punctuation\">.<\/span>content<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">finishShare<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd9\u91cc\u8981\u6ce8\u610f&#xff1a;\u4e0d\u540c\u7c7b\u578b\u7684 record \u7ed3\u6784\u4e0d\u4e00\u6837\u3002\u56fe\u7247\u7c7b\u578b\u7684 record \u91cc\u662f\u6587\u4ef6 URI&#xff0c;\u6587\u672c\u7c7b\u578b\u7684 record \u91cc\u662f content \u5b57\u6bb5\u3002\u4e0d\u80fd\u6240\u6709 record \u90fd\u6309\u540c\u4e00\u79cd\u65b9\u5f0f\u89e3\u6790\u3002<\/p>\n<h3>\u4e94\u3001URI \u4e3a\u4ec0\u4e48\u4e0d\u80fd\u76f4\u63a5\u5f53\u8def\u5f84\u7528<\/h3>\n<p>\u8fd9\u662f\u6700\u5bb9\u6613\u8e29\u7684\u5751\u3002\u63a5\u6536\u8fc7\u6765\u7684\u56fe\u7247 URI&#xff0c;\u4e0d\u662f\u5e94\u7528\u6c99\u7bb1\u91cc\u7684\u6587\u4ef6\u8def\u5f84&#xff0c;\u662f\u7cfb\u7edf\u5a92\u4f53\u5e93\u7684\u8d44\u6e90\u6807\u8bc6\u3002<\/p>\n<table>\n<tr>\u9519\u8bef\u505a\u6cd5\u6b63\u786e\u505a\u6cd5<\/tr>\n<tbody>\n<tr>\n<td>\u628a URI \u76f4\u63a5\u5f53\u6587\u4ef6\u8def\u5f84\u6253\u5f00<\/td>\n<td>\u901a\u8fc7\u7cfb\u7edf Kit \u7684\u63a5\u53e3\u8bfb\u53d6\u8d44\u6e90<\/td>\n<\/tr>\n<tr>\n<td>\u62fc\u63a5\u5b57\u7b26\u4e32\u731c\u771f\u5b9e\u8def\u5f84<\/td>\n<td>\u7528\u6587\u4ef6\u7ba1\u7406\u63a5\u53e3\u6309 URI \u8bfb\u53d6<\/td>\n<\/tr>\n<tr>\n<td>\u957f\u671f\u7f13\u5b58 URI \u76f4\u63a5\u7528<\/td>\n<td>\u8bfb\u53d6\u540e\u590d\u5236\u5230\u5e94\u7528\u6c99\u7bb1\u518d\u4f7f\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8de8\u5e94\u7528\u4f20\u8fc7\u6765\u7684 URI \u662f\u6709\u8bbf\u95ee\u6743\u9650\u7684&#xff0c;\u4e0d\u662f\u6c38\u4e45\u6709\u6548\u7684\u3002\u5904\u7406\u5b8c\u4e4b\u540e\u6700\u597d\u628a\u6587\u4ef6\u590d\u5236\u5230\u81ea\u5df1\u7684\u5e94\u7528\u6c99\u7bb1\u91cc&#xff0c;\u518d\u505a\u540e\u7eed\u5904\u7406\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920042458-6aaf601a175cd.jpg\" alt=\"\u65f6\u5e8f\u56fe\" \/><\/p>\n<h3>\u516d\u3001Session \u4e3a\u4ec0\u4e48\u5fc5\u987b\u6b63\u786e\u7ed3\u675f<\/h3>\n<p>\u5904\u7406\u5b8c\u5206\u4eab\u5185\u5bb9\u4e4b\u540e&#xff0c;\u5fc5\u987b\u8c03\u7528 finishShare \u6216\u8005 session.terminate() \u7ed3\u675f\u8fd9\u6b21\u5206\u4eab\u4f1a\u8bdd\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u7ed3\u675f\u4f1a\u600e\u4e48\u6837&#xff1f;\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u4e00\u76f4\u6302\u7740&#xff0c;\u7528\u6237\u64cd\u4f5c\u5b8c\u4e86\u9875\u9762\u4e0d\u6d88\u5931&#xff0c;\u4f53\u9a8c\u5f88\u5dee\u3002\u66f4\u4e25\u91cd\u7684\u662f&#xff0c;Session \u4e0d\u7ed3\u675f&#xff0c;\u8d44\u6e90\u4e00\u76f4\u4e0d\u91ca\u653e&#xff0c;\u5360\u7740\u5185\u5b58\u3002<\/p>\n<p>\u8fd8\u6709\u5f02\u5e38\u60c5\u51b5&#xff1a;\u5982\u679c\u5904\u7406\u6570\u636e\u51fa\u9519\u4e86&#xff0c;\u4e0d\u80fd\u53ea\u5199\u4e2a\u65e5\u5fd7\u5c31\u4e0d\u7ba1\u4e86\u3002\u8981\u7ed9\u7528\u6237\u4e00\u4e2a\u63d0\u793a&#xff0c;\u7136\u540e\u6b63\u5e38\u7ed3\u675f Session\u3002\u4e0d\u80fd\u8ba9\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u5361\u5728\u90a3\u91cc\u3002<\/p>\n<h3>\u4e03\u3001\u51e0\u4e2a\u5bb9\u6613\u8e29\u7684\u5751<\/h3>\n<p>\u7b2c\u4e00\u4e2a\u5751&#xff1a;\u53ea\u505a&#034;\u5206\u4eab\u51fa\u53bb&#034;&#xff0c;\u6ca1\u505a&#034;\u63a5\u6536\u5206\u4eab&#034;\u3002\u7ed3\u679c\u5e94\u7528\u5728\u5206\u4eab\u5217\u8868\u91cc\u90fd\u4e0d\u51fa\u73b0\u3002<\/p>\n<p>\u7b2c\u4e8c\u4e2a\u5751&#xff1a;UTD \u7c7b\u578b\u914d\u7f6e\u9519\u8bef\u3002\u914d\u7f6e\u7684\u7c7b\u578b\u548c\u5b9e\u9645\u8981\u63a5\u6536\u7684\u7c7b\u578b\u5bf9\u4e0d\u4e0a&#xff0c;\u8981\u4e48\u6536\u4e0d\u5230\u6570\u636e&#xff0c;\u8981\u4e48\u7cfb\u7edf\u4e0d\u663e\u793a\u3002<\/p>\n<p>\u7b2c\u4e09\u4e2a\u5751&#xff1a;\u56fe\u7247\u6570\u91cf\u8d85\u8fc7 maxFileSupported\u3002\u4e00\u6b21\u5206\u4eab\u4e86 30 \u5f20\u56fe&#xff0c;\u4f46\u914d\u7f6e\u7684\u6700\u591a\u652f\u6301 20 \u5f20&#xff0c;\u90a3\u4f60\u7684\u5e94\u7528\u76f4\u63a5\u4ece\u5206\u4eab\u5217\u8868\u91cc\u6d88\u5931\u4e86\u3002<\/p>\n<p>\u7b2c\u56db\u4e2a\u5751&#xff1a;\u628a URI \u5f53\u666e\u901a\u6587\u4ef6\u8def\u5f84\u3002\u8de8\u5e94\u7528\u4f20\u8fc7\u6765\u7684 URI \u4e0d\u662f\u6c99\u7bb1\u8def\u5f84&#xff0c;\u76f4\u63a5 open \u4f1a\u5931\u8d25\u3002<\/p>\n<p>\u7b2c\u4e94\u4e2a\u5751&#xff1a;\u6240\u6709\u6570\u636e\u7c7b\u578b\u90fd\u6309\u540c\u4e00\u79cd\u65b9\u5f0f\u89e3\u6790\u3002\u6587\u672c\u548c\u56fe\u7247\u7684 record \u7ed3\u6784\u4e0d\u4e00\u6837&#xff0c;\u6df7\u7740\u89e3\u6790\u5c31\u4f1a\u51fa\u9519\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920042458-6aaf601aadfcd.jpg\" alt=\"\u8fd0\u884c\u6548\u679c\u56fe\" \/><\/p>\n<p>\u8fd9\u6b21\u505a\u5206\u4eab\u63a5\u6536\u529f\u80fd\u6700\u5927\u7684\u4f53\u4f1a\u662f&#xff1a;\u5206\u4eab\u51fa\u53bb\u53ea\u662f\u628a\u6570\u636e\u6253\u5305\u6254\u51fa\u53bb&#xff0c;\u63a5\u6536\u5206\u4eab\u624d\u662f\u771f\u6b63\u7684\u5de5\u7a0b\u6d3b\u3002\u8981\u914d\u7f6e\u7c7b\u578b\u3001\u8981\u89e3\u6790\u6570\u636e\u3001\u8981\u5904\u7406 URI\u3001\u8981\u7ba1\u7406 Session\u3001\u8981\u5904\u7406\u5f02\u5e38\u3002\u770b\u8d77\u6765\u5c31\u662f&#034;\u70b9\u4e00\u4e0b\u5206\u4eab\u6309\u94ae&#034;\u7684\u4e8b&#xff0c;\u80cc\u540e\u6709\u4e00\u6574\u5957\u8de8\u5e94\u7528\u6570\u636e\u6d41\u8f6c\u7684\u673a\u5236\u5728\u8dd1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u628a\u5185\u5bb9\u5206\u4eab\u51fa\u53bb\u5bb9\u6613&#xff0c;\u628a\u522b\u4eba\u5206\u4eab\u8fc7\u6765\u7684\u5185\u5bb9\u6b63\u786e\u63a5\u4f4f\u624d\u662f\u771f\u9ebb\u70e6\u3002\u505a\u7b14\u8bb0\u5e94\u7528\u7684\u65f6\u5019&#xff0c;\u6700\u5f00\u59cb\u53ea\u505a\u4e86\\&#8221;\u5206\u4eab\u51fa\u53bb\\&#8221;&#xff1a;\u5199\u5b8c\u7b14\u8bb0\u70b9\u5206\u4eab&#xff0c;\u628a\u6587\u672c\u548c\u56fe\u7247\u4f20\u7ed9\u5176\u4ed6\u5e94\u7528\u3002\u8fd9\u4e2a\u529f\u80fd\u5f88\u7b80\u5355&#xff0c;\u8c03\u7528 Share Kit \u7684 API \u5c31\u5b8c\u4e8b\u4e86\u3002<br \/>\n\u540e\u6765\u7528\u6237\u63d0\u9700\u6c42&#xff1a;\u80fd\u4e0d\u80fd\u5728\u76f8\u518c\u91cc\u9009\u4e00\u5f20\u56fe&#xff0c;\u76f4\u63a5\u5206\u4eab\u5230\u6211\u4eec\u7684\u7b14\u8bb0\u5e94\u7528\u91cc&#xff1f;\u8fd9\u65f6\u5019\u624d\u53d1\u73b0&#xff0c;\\&#8221;\u63a5\u6536\u5206\u4eab\\&#8221;\u6bd4\\&#8221;\u5206\u4eab\u51fa\u53bb\\&#8221;\u9ebb\u70e6\u591a\u4e86\u2014\u2014\u8981\u914d\u7f6e\u63a5\u6536\u7c7b\u578b\u3001\u8981\u89e3\u6790<\/p>\n","protected":false},"author":2,"featured_media":107848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[280],"topic":[],"class_list":["post-107851","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-harmonyos"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/107851.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u628a\u5185\u5bb9\u5206\u4eab\u51fa\u53bb\u5bb9\u6613&#xff0c;\u628a\u522b\u4eba\u5206\u4eab\u8fc7\u6765\u7684\u5185\u5bb9\u6b63\u786e\u63a5\u4f4f\u624d\u662f\u771f\u9ebb\u70e6\u3002\u505a\u7b14\u8bb0\u5e94\u7528\u7684\u65f6\u5019&#xff0c;\u6700\u5f00\u59cb\u53ea\u505a\u4e86&quot;\u5206\u4eab\u51fa\u53bb&quot;&#xff1a;\u5199\u5b8c\u7b14\u8bb0\u70b9\u5206\u4eab&#xff0c;\u628a\u6587\u672c\u548c\u56fe\u7247\u4f20\u7ed9\u5176\u4ed6\u5e94\u7528\u3002\u8fd9\u4e2a\u529f\u80fd\u5f88\u7b80\u5355&#xff0c;\u8c03\u7528 Share Kit \u7684 API \u5c31\u5b8c\u4e8b\u4e86\u3002 \u540e\u6765\u7528\u6237\u63d0\u9700\u6c42&#xff1a;\u80fd\u4e0d\u80fd\u5728\u76f8\u518c\u91cc\u9009\u4e00\u5f20\u56fe&#xff0c;\u76f4\u63a5\u5206\u4eab\u5230\u6211\u4eec\u7684\u7b14\u8bb0\u5e94\u7528\u91cc&#xff1f;\u8fd9\u65f6\u5019\u624d\u53d1\u73b0&#xff0c;&quot;\u63a5\u6536\u5206\u4eab&quot;\u6bd4&quot;\u5206\u4eab\u51fa\u53bb&quot;\u9ebb\u70e6\u591a\u4e86\u2014\u2014\u8981\u914d\u7f6e\u63a5\u6536\u7c7b\u578b\u3001\u8981\u89e3\u6790\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/107851.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-20T04:25:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920042457-6aaf60195f348.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107851.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/107851.html\",\"name\":\"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-20T04:25:00+00:00\",\"dateModified\":\"2026-09-20T04:25:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/107851.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/107851.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107851.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/107851.html","og_locale":"zh_CN","og_type":"article","og_title":"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u628a\u5185\u5bb9\u5206\u4eab\u51fa\u53bb\u5bb9\u6613&#xff0c;\u628a\u522b\u4eba\u5206\u4eab\u8fc7\u6765\u7684\u5185\u5bb9\u6b63\u786e\u63a5\u4f4f\u624d\u662f\u771f\u9ebb\u70e6\u3002\u505a\u7b14\u8bb0\u5e94\u7528\u7684\u65f6\u5019&#xff0c;\u6700\u5f00\u59cb\u53ea\u505a\u4e86\"\u5206\u4eab\u51fa\u53bb\"&#xff1a;\u5199\u5b8c\u7b14\u8bb0\u70b9\u5206\u4eab&#xff0c;\u628a\u6587\u672c\u548c\u56fe\u7247\u4f20\u7ed9\u5176\u4ed6\u5e94\u7528\u3002\u8fd9\u4e2a\u529f\u80fd\u5f88\u7b80\u5355&#xff0c;\u8c03\u7528 Share Kit \u7684 API \u5c31\u5b8c\u4e8b\u4e86\u3002 \u540e\u6765\u7528\u6237\u63d0\u9700\u6c42&#xff1a;\u80fd\u4e0d\u80fd\u5728\u76f8\u518c\u91cc\u9009\u4e00\u5f20\u56fe&#xff0c;\u76f4\u63a5\u5206\u4eab\u5230\u6211\u4eec\u7684\u7b14\u8bb0\u5e94\u7528\u91cc&#xff1f;\u8fd9\u65f6\u5019\u624d\u53d1\u73b0&#xff0c;\"\u63a5\u6536\u5206\u4eab\"\u6bd4\"\u5206\u4eab\u51fa\u53bb\"\u9ebb\u70e6\u591a\u4e86\u2014\u2014\u8981\u914d\u7f6e\u63a5\u6536\u7c7b\u578b\u3001\u8981\u89e3\u6790","og_url":"https:\/\/www.wsisp.com\/helps\/107851.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-20T04:25:00+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260920042457-6aaf60195f348.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/107851.html","url":"https:\/\/www.wsisp.com\/helps\/107851.html","name":"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-20T04:25:00+00:00","dateModified":"2026-09-20T04:25:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/107851.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/107851.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/107851.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"HarmonyOS 7 Share Kit + ShareExtensionAbility \u5b9e\u6218\uff1a\u7cfb\u7edf\u5206\u4eab\u9762\u677f\u3001\u6570\u636e\u63a5\u6536\u4e0e\u8de8\u5e94\u7528\u5185\u5bb9\u6d41\u8f6c"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=107851"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107851\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/107848"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=107851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=107851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=107851"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=107851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}