{"id":1825,"date":"2022-11-25T18:00:26","date_gmt":"2022-11-25T10:00:26","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/1825.html"},"modified":"2022-11-25T18:00:26","modified_gmt":"2022-11-25T10:00:26","slug":"%e5%b0%8f%e7%b1%b3app%e7%9b%b8%e5%86%8c%e5%ae%89%e5%85%a8%e5%88%86%e4%ba%ab%e9%80%82%e9%85%8d%e6%96%87%e6%a1%a3","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/1825.html","title":{"rendered":"\u5c0f\u7c73APP\u76f8\u518c\u5b89\u5168\u5206\u4eab\u9002\u914d\u6587\u6863"},"content":{"rendered":"<h2 id=\"_0\">\u4e00\u3001 \u529f\u80fd\u4ecb\u7ecd<\/h2>\n<p>\u5f00\u542f<span class=\"wpcom_tag_link\">\u5c0f\u7c73\u76f8\u518c<\/span>\u7684\u5b89\u5168\u5206\u4eab\u529f\u80fd\u540e\uff0c\u4ece<span class=\"wpcom_tag_link\">\u76f8\u518c<\/span>\u5206\u4eab\u56fe\u7247\u4f1a\u81ea\u52a8\u62b9\u9664\u4f4d\u7f6e\u3001\u624b\u673a\u578b\u53f7\u3001\u62cd\u6444\u53c2\u6570\u7b49\u4fe1\u606f\u3002<\/p>\n<p>\u5b89\u5168\u5206\u4eab\u5f00\u5173\uff1a \u76f8\u518c-&gt;\u53f3\u4e0a\u89d2\u83dc\u5355-&gt;\u8bbe\u7f6e-&gt;\u5b89\u5168\u5206\u4eab<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221124140402576.png\" alt=\"\u5c0f\u7c73APP\u76f8\u518c\u5b89\u5168\u5206\u4eab\u9002\u914d\u6587\u6863\" \/><img decoding=\"async\" class=\"j-lazy\" src=\"https:\/\/www.yimenapp.com\/kb-yimen\/wp-content\/themes\/justnews\/themer\/assets\/images\/lazy.png\" data-original=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221124140402576.png\" alt=\"\u5c0f\u7c73APP\u76f8\u518c\u5b89\u5168\u5206\u4eab\u9002\u914d\u6587\u6863\" \/><\/figure>\n<h2 id=\"_1\">\u4e8c\u3001\u5206\u4eab\u56fe\u7247\u8def\u5f84\u53d8\u5316<\/h2>\n<p>\u5c0f\u7c73\u76f8\u518c\u4e2d\u6253\u5f00\u5b89\u5168\u5206\u4eab\u4e2d\u4efb\u610f\u4e00\u4e2a\u5f00\u5173\uff08\u9ed8\u8ba4\u62b9\u9664\u7167\u7247\u4f4d\u7f6e\u3001\u9ed8\u8ba4\u62b9\u9664\u7167\u7247\u62cd\u6444\u4fe1\u606f\uff09\u540e\uff0c\u4ece\u76f8\u518c\u5206\u4eab\u65f6\u4f1a\u5c06\u62b9\u9664\u76f8\u5173\u4fe1\u606f\u7684\u7167\u7247\u4fdd\u5b58\u5230\u76f8\u518c\u7684\u79c1\u6709\u76ee\u5f55\uff0c\u7136\u540e\u901a\u8fc7FileProvider\u7684\u65b9\u5f0f\u751f\u6210content:\/\/Uri\u5206\u4eab\u7ed9\u5e94\u7528<\/p>\n<p>\u5f00\u542f\u5b89\u5168\u5206\u4eab\u540e\u5206\u4eab\u7684\u7167\u7247\u8def\u5f84\uff1a<\/p>\n<p>storage\/emulated\/0\/Android\/data\/com.miui.gallery\/cache\/SecurityShare\/XXX.jpg<\/p>\n<p>\u672a\u5f00\u542f\u5b89\u5168\u5206\u4eab\u529f\u80fd\u5206\u4eab\u7684\u7167\u7247\u8def\u5f84\uff1a<\/p>\n<p>storage\/emulated\/0\/DCIM\/Screenshots\/XXX.jpg<\/p>\n<h2 id=\"_2\">\u4e09\u3001\u5e94\u7528\u4e0d\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\u79c1\u6709\u76ee\u5f55<\/h2>\n<p>\u7531\u4e8e\u4eceAndroid11\u5f00\u59cb\uff0c\u5e94\u7528\u7684\u79c1\u6709\u76ee\u5f55\u4e0d\u80fd\u88ab\u5916\u90e8\u8bbf\u95ee\uff0c\u5373\u4f7f\u83b7\u53d6\u4e86\u201c\u6240\u6709\u6587\u4ef6\u7ba1\u7406\u201d\u6743\u9650\u4e5f\u4e0d\u884c\u3002\u5177\u4f53\u53c2\u89c1https:\/\/developer.android.google.cn\/about\/versions\/11\/privacy\/storage\u3002\u56e0\u6b64\u5982\u679c\u5728\u7528\u6237\u6253\u5f00\u5b89\u5168\u5206\u4eab\u7684\u60c5\u51b5\u4e0b\uff0c\u5e94\u7528\u63a5\u6536\u5230\u76f8\u518c\u4f20\u9012\u7ed9\u5e94\u7528\u7684URL\uff0c\u83b7\u53d6\u5230\u7edd\u5bf9\u8def\u5f84\uff0c\u518d\u76f4\u63a5\u901a\u8fc7\u8bbf\u95ee\u7edd\u5bf9\u8def\u5f84\u7684\u65b9\u5f0f\u6765\u8bfb\u53d6\u7167\u7247\uff0c<a href=\"https:\/\/app.applebyme.cn\/shengcheng-93.html\">App\u751f\u6210\u5668<\/a>\u4f1a\u53d1\u751f\u8bfb\u53d6\u5f02\u5e38\u3002<\/p>\n<p>\u4f8b\u5982\u4ee5\u4e0b\u9519\u8bef<\/p>\n<pre class=\"wp-block-code\"><code>BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: \/storage\/emulated\/0\/Android\/data\/com.miui.gallery\/cache\/SecurityShare\/1655174005823.jpg: open failed: ENOENT (No such file or directory)<\/code><\/pre>\n<h2 id=\"_3\">\u56db\u3001\u9002\u914d\u65b9\u5f0f\u63a8\u8350FileProvider<\/h2>\n<p>\u9488\u5bf9\u5f00\u542f\u5b89\u5168\u5206\u4eab\u7684\u60c5\u51b5\u4e0b\uff0c\u5206\u4eab\u7167\u7247\u5230\u5e94\u7528\uff0c\u5efa\u8bae\u5e94\u7528\u4f7f\u7528fileprovider(https:\/\/developer.android.com\/reference\/androidx\/core\/content\/FileProvider)\u7684\u65b9\u5f0f\u8bbf\u95ee\u7167\u7247\uff0c\u53c2\u8003\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>Intent intent = getIntent();\nString action = intent.getAction();\nString type = intent.getType();\n\n<strong>if<\/strong> (Intent.ACTION_SEND.equals(action) &amp;&amp; type != <strong>null<\/strong>) {\n     <strong>if<\/strong> (type.startsWith(\"image\/\")) {\n         Uri imageUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);\n         InputStream is = <strong>null<\/strong>;\n        <strong>try<\/strong> {\n            is = getContentResolver().openI<a href=\"https:\/\/app.applebyme.cn\/shengcheng-22.html\">app\u81ea\u52a8\u751f\u6210\u5668<\/a>nputStream(imageUri);\n            Bitmap bmp = BitmapFactory.decodeStream(is);\n            imageView.setImageBitmap(bmp);\n        } <strong>catch<\/strong> (FileNotFoundException e) {\n            e.printStackTrace();\n        } <strong>finally<\/strong> {\n            <strong>try<\/strong> {\n                is.close();\n            } <strong>catch<\/strong> (IOException e) {\n                e.printStackTrace();\n            }\n        }\n     }\n    } <\/code><\/pre>\n<p>\u7f16\u8f91\uff1ayimen\uff0c\u5982\u82e5\u8f6c\u8f7d\uff0c\u8bf7\u6ce8\u660e\u51fa\u5904\uff1ahttps:\/\/www.yimenapp.com\/kb-yimen\/12528\/<\/p>\n<p>\u90e8\u5206\u5185\u5bb9\u6765\u81ea\u7f51\u7edc\u6295\u7a3f\uff0c\u5982\u6709\u4fb5\u6743\u8054\u7cfb\u7acb\u5220<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001 \u529f\u80fd\u4ecb\u7ecd\u5f00\u542f\u5c0f\u7c73\u76f8\u518c\u7684\u5b89\u5168\u5206\u4eab\u529f\u80fd\u540e\uff0c\u4ece\u76f8\u518c\u5206\u4eab\u56fe\u7247\u4f1a\u81ea\u52a8\u62b9\u9664\u4f4d\u7f6e\u3001\u624b\u673a\u578b\u53f7\u3001\u62cd\u6444\u53c2\u6570\u7b49\u4fe1\u606f\u3002\u5b89\u5168\u5206\u4eab\u5f00\u5173\uff1a \u76f8\u518c-&gt;\u53f3\u4e0a\u89d2\u83dc\u5355-&gt;\u8bbe\u7f6e-&gt;\u5b89\u5168\u5206\u4eab\u4e8c\u3001\u5206\u4eab\u56fe\u7247\u8def\u5f84\u53d8\u5316\u5c0f\u7c73\u76f8\u518c\u4e2d\u6253\u5f00\u5b89\u5168\u5206\u4eab\u4e2d\u4efb\u610f\u4e00\u4e2a\u5f00\u5173\uff08\u9ed8\u8ba4\u62b9\u9664\u7167\u7247\u4f4d\u7f6e\u3001\u9ed8\u8ba4\u62b9\u9664\u7167\u7247\u62cd\u6444\u4fe1\u606f\uff09\u540e\uff0c\u4ece\u76f8\u518c\u5206\u4eab\u65f6\u4f1a\u5c06\u62b9\u9664\u76f8\u5173\u4fe1\u606f\u7684\u7167\u7247\u4fdd\u5b58\u5230\u76f8\u518c<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[758,548,1280],"class_list":["post-1825","post","type-post","status-publish","format-standard","hentry","category-appshangjia","tag-app","tag-548","tag-1280"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/1825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=1825"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/1825\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=1825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=1825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=1825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}