{"id":34824,"date":"2024-07-31T15:08:08","date_gmt":"2024-07-31T07:08:08","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=34824"},"modified":"2024-07-31T15:08:08","modified_gmt":"2024-07-31T07:08:08","slug":"apk-%e4%ba%8c%e7%bb%b4%e7%a0%81%e7%94%9f%e6%88%90%e8%a6%81%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2024\/appkfa\/34824\/","title":{"rendered":"apk \u4e8c\u7ef4\u7801\u751f\u6210\u8981\u600e\u4e48\u5b9e\u73b0?"},"content":{"rendered":"<p>APK\u4e8c\u7ef4\u7801\u751f\u6210\u662f\u4e00\u79cd\u5728Android\u5e73\u53f0\u4e0a\u5b9e\u73b0\u7684\u529f\u80fd\uff0c\u901a\u8fc7\u751f\u6210\u4e8c\u7ef4\u7801\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bc6\u522b\u548c\u5206\u4eabAPP\u4fe1\u606f\u3002\u672c\u6587\u5c06\u4ecb\u7ecdAPK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>\u4e00\u3001\u539f\u7406\u4ecb\u7ecd\uff1a<\/p>\n<p>APK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u539f\u7406\u57fa\u4e8eQR\u7801\uff08Quick Response Code\uff09\uff0cQR\u7801\u662f\u4e00\u79cd\u4e8c\u7ef4\u7801\u7684\u6807\u51c6\uff0c\u53ef\u4ee5\u5b58\u50a8\u5f88\u591a\u4fe1\u606f\u3002APK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u76ee\u7684\u662f\u5c06\u4e00\u4e2aAPP\u7684\u4e0b\u8f7d\u5730\u5740\u6216\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u8f6c\u5316\u6210\u4e8c\u7ef4\u7801\u7684\u5f62\u5f0f\uff0c\u65b9\u4fbf\u7528\u6237\u901a\u8fc7\u626b\u63cf\u4e8c\u7ef4\u7801\u5feb\u901f\u8bbf\u95ee\u548c\u4e0b\u8f7dAPP\u3002<\/p>\n<p>\u5728\u751f\u6210APK\u4e8c\u7ef4\u7801\u65f6\uff0c\u4e3b\u8981\u7684\u539f\u7406\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u83b7\u53d6APK\u6587\u4ef6\u7684\u4e0b\u8f7d\u5730\u5740\u6216\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n<p>2. \u4f7f\u7528\u4e8c\u7ef4\u7801\u751f\u6210\u5e93\u751f\u6210\u76f8\u5e94\u7684\u4e8c\u7ef4\u7801\u56fe\u7247\u3002<\/p>\n<p>3. \u5c06\u4e8c\u7ef4\u7801\u56fe\u7247\u63d2\u5165\u5230\u7f51\u9875\u3001APP\u754c\u9762\u6216\u5176\u4ed6\u5a92\u4ecb\u4e2d\uff0c\u4f9b\u7528\u6237\u626b\u63cf\u3002<\/p>\n<p>\u4e8c\u3001\u8be6\u7ec6\u4ecb\u7ecd\uff1a<\/p>\n<p>\u4e0b\u9762\u5c06\u9010\u6b65\u4ecb\u7ecdAPK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>1. \u83b7\u53d6APK\u6587\u4ef6\u7684\u4e0b\u8f7d\u5730\u5740\u6216\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\uff1a<\/p>\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u5df2\u7ecf\u53d1\u5e03\u7684APP\uff0c\u53ef\u4ee5\u4ece\u5e94\u7528\u5546\u5e97\u3001\u5b98\u65b9\u7f51\u7ad9\u6216\u5176\u4ed6\u6e20\u9053\u83b7\u53d6\u5230APK\u6587\u4ef6\u7684\u4e0b\u8f7d\u5730\u5740\u3002<\/p>\n<p>2. \u4f7f\u7528\u4e8c\u7ef4\u7801\u751f\u6210\u5e93\u751f\u6210\u4e8c\u7ef4\u7801\u56fe\u7247\uff1a<\/p>\n<p>\u5728Android\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6765\u751f\u6210\u4e8c\u7ef4\u7801\u56fe\u7247\u3002\u5e38\u7528\u7684\u5e93\u5305\u62ecZxing\u3001QRGen\u7b49\u3002\u4ee5Zxing\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u5728Gradle\u6587\u4ef6\u4e2d\u5f15\u5165\u4f9d\u8d56\uff1a<\/p>\n<p>&#8220;`groovy<\/p>\n<p>implementation &#8216;com.google.zxing:core:3.3.3&#8217;<\/p>\n<p>implementation &#8216;com.journeyapps:zxing-android-embedded:4.2.0&#8217;<\/p>\n<p>&#8220;`<\/p>\n<p>\u7136\u540e\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\u6765\u751f\u6210\u4e8c\u7ef4\u7801\u56fe\u7247\uff1a<\/p>\n<p>&#8220;`java<\/p>\n<p>String apkUrl = &#8220;http:\/\/example.com\/app.apk&#8221;;<\/p>\n<p>int width = 400;<\/p>\n<p>int height = 400;<\/p>\n<p>try {<\/p>\n<p>    BitMatrix bitMatrix = new MultiFormatWriter().encode(apkUrl, BarcodeFormat.QR_CODE, width, height);<\/p>\n<p>    BarcodeEncoder barcodeEncoder = new BarcodeEncoder();<\/p>\n<p>    Bitmap bitmap = barcodeEncoder.createBitmap(bitMatrix);<\/p>\n<p>    \/\/ \u5728\u754c\u9762\u4e0a\u5c55\u793a\u751f\u6210\u7684\u4e8c\u7ef4\u7801\u56fe\u7247<\/p>\n<p>} catch (WriterException e) {<\/p>\n<p>    e.printStackTrace();<\/p>\n<p>}<\/p>\n<p>&#8220;`<\/p>\n<p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b9a\u4e49\u4e86APK\u6587\u4ef6\u7684\u4e0b\u8f7d\u5730\u5740\uff0c\u7136\u540e\u8bbe\u7f6e\u4e86\u751f\u6210\u4e8c\u7ef4\u7801\u56fe\u7247\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002\u63a5\u7740\u4f7f\u7528`MultiFormatWriter().encode()`\u65b9\u6cd5\u751f\u6210\u4e00\u4e2a\u4e8c\u7ef4\u7801\u7684`BitMatrix`\u5bf9\u8c61\uff0c\u518d\u901a\u8fc7`BarcodeEncoder().createBitmap()`\u65b9<a href=\"https:\/\/www.anzhuoe.net\/apk-dabao-4806.html\">\u6253\u5305apk\u76f4\u63a5\u6253\u5305\u5931\u8d25<\/a>\u6cd5\u5c06`BitMatrix`\u5bf9\u8c61\u8f6c\u6362\u6210`Bitmap`\u5bf9\u8c61\uff0c\u6700\u540e\u53ef\u4ee5\u5c06\u751f\u6210\u7684\u4e8c\u7ef4\u7801\u56fe\u7247\u5c55\u793a\u5728\u754c\u9762\u4e0a\u3002<\/p>\n<p>3. \u5c06\u4e8c\u7ef4\u7801\u56fe\u7247\u63d2\u5165\u5230\u7f51\u9875\u3001APP\u754c\u9762\u6216\u5176\u4ed6\u5a92\u4ecb\u4e2d\uff1a<\/p>\n<p>\u5728\u751f\u6210\u4e86\u4e8c\u7ef4\u7801\u56fe\u7247\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5176\u63d2\u5165\u5230\u7f51\u9875\u3001APP\u754c\u9762\u6216\u5176\u4ed6\u5a92\u4ecb\u4e2d\uff0c\u4f9b\u7528\u6237\u626b\u63cf\u3002\u53ef\u4ee5\u4f7f\u7528`ImageView`\u6765\u5c55\u793a\u4e8c\u7ef4\u7801\u56fe\u7247\uff1a<\/p>\n<p>&#8220;`xml<\/p>\n<\/p>\n<p>    android:id=&#8221;@+id\/qr_code_image&#8221;<\/p>\n<p>    android:layout_width=&#8221;wrap_cont<a href=\"https:\/\/www.anzhuoe.net\/apk-dabao-6452.html\">\u600e\u4e48\u6253\u5305apk\u4e0d\u62a5\u6bd2<\/a>ent&#8221;<\/p>\n<p>    android:layout_height=&#8221;wrap_content&#8221; \/&gt;<\/p>\n<p>&#8220;`<\/p>\n<p>\u7136\u540e\u5728\u4ee3\u7801\u4e2d\u52a0\u8f7d\u751f\u6210\u7684\u4e8c\u7ef4\u7801\u56fe\u7247\uff1a<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.myapp.ltd\/ag\/102\/apk\/69.jpg\" \/><\/figure>\n<\/p>\n<p>&#8220;`java<\/p>\n<p>ImageView qrCodeImageView = findViewById(R.id.qr_code_image);<\/p>\n<p>qrCodeImageView.setImageBitmap(bitmap);<\/p>\n<p>&#8220;`<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5b9e\u73b0\u5728Android\u5e73\u53f0\u4e0a\u751f\u6210APK\u4e8c\u7ef4\u7801\uff0c\u5e76\u5c06\u5176\u5c55\u793a\u51fa\u6765\uff0c\u4f9b\u7528\u6237\u626b\u63cf\u3002<\/p>\n<p>\u603b\u7ed3\uff1a<\/p>\n<p>\u672c\u6587\u4ecb\u7ecd\u4e86APK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u901a\u8fc7\u83b7\u53d6APK\u6587\u4ef6\u7684\u4e0b\u8f7d\u5730\u5740\u6216\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\uff0c\u4f7f\u7528\u4e8c\u7ef4\u7801\u751f\u6210\u5e93\u751f\u6210\u4e8c\u7ef4\u7801\u56fe\u7247\uff0c\u5e76\u5c06\u5176\u63d2\u5165\u5230\u7f51\u9875\u3001APP\u754c\u9762\u6216\u5176\u4ed6\u5a92\u4ecb\u4e2d\uff0c\u5b9e\u73b0\u4e86APK\u4e8c\u7ef4\u7801\u7684\u751f\u6210\u548c\u5c55\u793a\u3002\u901a\u8fc7\u626b\u63cf\u4e8c\u7ef4\u7801\uff0c\u7528\u6237\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bbf\u95ee\u548c\u4e0b\u8f7dAPP\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>APK\u4e8c\u7ef4\u7801\u751f\u6210\u662f\u4e00\u79cd\u5728Android\u5e73\u53f0\u4e0a\u5b9e\u73b0\u7684\u529f\u80fd\uff0c\u901a\u8fc7\u751f\u6210\u4e8c\u7ef4\u7801\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bc6\u522b\u548c\u5206\u4eabAPP\u4fe1\u606f\u3002\u672c\u6587\u5c06\u4ecb\u7ecdAPK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u4e00\u3001\u539f\u7406\u4ecb\u7ecd\uff1aAPK\u4e8c\u7ef4\u7801\u751f\u6210\u7684\u539f\u7406\u57fa\u4e8eQR\u7801\uff08Q<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[31336,942,2293,31335,845],"topic":[],"class_list":["post-34824","post","type-post","status-publish","format-standard","hentry","category-appkfa","tag-androidapk","tag-942","tag-2293","tag-apk","tag-845"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/34824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/comments?post=34824"}],"version-history":[{"count":1,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/34824\/revisions"}],"predecessor-version":[{"id":34850,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/34824\/revisions\/34850"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=34824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=34824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=34824"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=34824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}